Rick Carlino
5722bea421
Huge formatting update (sorry)
2020-01-17 09:58:53 -06:00
Rick Carlino
845e69ce7e
Re-enable set_servo_angle
...
* set_servo_angle works.
* Tests for set_servo_angle in FarmbotCeleryScript.Syscalls
2019-12-27 11:45:26 -06:00
Connor Rigby
6cb47d43aa
Add docs for generating app specific docs
2019-12-18 13:01:20 -08:00
Connor Rigby
fa15763c85
Update docs for farmbot_os OTP app
2019-12-17 14:25:20 -08:00
Connor Rigby
ec56ebaf74
Add telemetry to the rest of the app
...
More things will be added in the future.
Metrics are collected from bot state because
the amount of messages sent by every bot would
make datadog charge us a lot of money
2019-10-31 14:00:08 -07:00
Connor Rigby
1ff2a7d153
Implement `every_point` and `point_group` Celery nodes
2019-10-22 14:19:32 -07:00
Connor Rigby
b0ea0df183
Refactor all movement sys_calls into their own file
2019-10-01 09:13:42 -07:00
Connor Rigby
96574f2033
Implement `resource_update` celery node
2019-09-24 12:47:08 -07:00
connor rigby
c03e62bdfe
Add "really fast blink" for syncing led
2019-09-17 12:22:36 -07:00
Connor Rigby
8a816ba1f4
Change if and read_pin to function the same as v7
...
this prevents the possibility of reading a sensor and it changing
by the time an if statement is executed
2019-09-13 16:03:34 -07:00
Connor Rigby
659f95461e
Fix movement commands retrying on estop
2019-09-13 16:03:34 -07:00
Connor Rigby
eb2c7fb874
Add movement retries to sys_calls
...
This will cause farmbot to retry a movement up to 5 times before
actually considering a movement failed
2019-09-13 16:03:34 -07:00
Connor Rigby
46d259202c
Add sequence start/complete logs to regimen and farm_events
2019-09-13 16:03:34 -07:00
Connor Rigby
cf2877c76e
Ensure firmware/rpc logs always dispatch
2019-09-13 16:03:33 -07:00
Connor Rigby
f400b2746f
Add new RPC for `toggle_pin`
...
This was previously implemented as a "macro" that just expanded
`toggle_pin` to a series of `read_pin` -> `write_pin` -> `read_pin` this
lead to three logs instead of just one. The implementation is still
mostly the same, but now there is less logging.
Also factored all pin control into it's own module
2019-09-13 16:03:32 -07:00
Connor Rigby
209ded96cb
Add Lua helpers for updating and getting resources
2019-09-13 16:03:32 -07:00
Connor Rigby
a242cce830
Add new log type for assertion logs
2019-09-13 16:03:32 -07:00
Connor Rigby
7e1ceaf7be
Implement new AST: `assert`.
...
This is a new AST that will allow executing a
simple expression and conditionally pass/fail
and cleanup when it completes.
2019-09-13 16:03:31 -07:00
Connor Rigby
fcadeebe6e
Add `update_farmware` rpc back
2019-09-13 16:03:31 -07:00
connor rigby
df39a7c289
Make sure FarmwareEnv is updated in the API after an update
2019-09-13 16:03:31 -07:00
connor rigby
05eeb74fc8
Re-implement set_pin_io_mode
2019-09-13 16:03:30 -07:00
connor rigby
405da18d3d
Let `set_user_env` create a FarmwareEnv asset
...
FarmwareEnvs are mirrored on the bot state already
2019-09-13 16:03:30 -07:00
Connor Rigby
77c5015a23
Fix BoxLed4
2019-09-13 16:03:30 -07:00
connor rigby
e199cb8a90
Add LED handler for green (sync status)
2019-09-13 16:03:29 -07:00
Gabriel Burnworth
9469d47f9f
Fix shutdown not powering off
2019-09-13 16:03:27 -07:00
connor rigby
55533675f5
Reenable sequence init and sequence complete logs
...
Sort of a hack, but store some metadata about a sequence in the AST
format, and if it exists, log it
2019-09-13 16:03:26 -07:00
Connor Rigby
a160d6a41b
Fix factory_resetting the arduino-firmware
...
* Adds `api_migrated` field to FirmwareConfig
* Changes `factory_reset()` syscall to be `factory_reset(package)`
2019-09-13 16:03:25 -07:00
connor rigby
4e2e8dde69
Tweak digital sensor logs to not include on/off
2019-09-13 16:03:25 -07:00
connor rigby
5ca92090a1
Update more logs
...
* Any float is not formatted very specifically
* if the remainder in the decimal is `0`, don't display decimal
* if the remainder is not zero, truncate to only one decimal place
* Write/Read pin
* yeah that got messy
2019-09-13 16:03:25 -07:00
connor rigby
0cbb4ba784
Fix named pins causing celeryscript errors
...
NamedPin values were encoded as tuples. This changes it to
pattern matchable structs, and implements a `to_string` behaviour
for those structs
2019-09-13 16:03:24 -07:00
Connor Rigby
c92c79347f
Add back step logs
2019-09-13 16:03:24 -07:00
Connor Rigby
e7ea334ab2
Change Preloading and Caching to use the same system as auto_sync
...
* preloader and reconciler no longer use a transaction
* This will prevent rolling back a failed sync, but allows farmbot to
continue operating if a sync does fail
* usage of the preloader updated to reflect this
2019-09-13 16:03:23 -07:00
Connor Rigby
00d0897672
Dry up celery_script compilation
...
This adds much more type checking and error
handling in the compiled celery_script.
Also removes the hack/shortcut in the StubSysCalls
module.
2019-09-13 16:03:23 -07:00
Connor Rigby
c7f509d7a3
Lookup pins before read_pin
...
This will create sensor_values even if `NamedPin`
is not used
2019-09-13 16:03:22 -07:00
Connor Rigby
5ed88ccb40
Expand `read_pin` and `write_pin`
...
* `read_pin` and `write_pin` for `BoxLed`
* `read_pin` of a `Sensor` will create a `SensorValue`
2019-09-13 16:03:22 -07:00
Connor Rigby
fc9f31cfa8
Update Asset commands for Sensors
2019-09-13 16:03:22 -07:00
Connor Rigby
9a16c79ee8
Implement error handling for api 429 errors
...
* Changes auto_sync_channel to no longer use `handle_continue`
* If preloading fails, retry instead of crashing.
* Make `get_changeset` return an error rather than raising an exception
* Update every use of that function to handle posibility of error
2019-09-13 16:03:22 -07:00
Connor Rigby
946e4e07da
More fixes to Asset.Command
...
* Further argument reordering
* Get rid of over verbose Sequence lookups
* Add tests for `Asset.Command`
2019-09-13 16:03:22 -07:00
Connor Rigby
b6120041ef
Rename bot_state_channel to reflect the previous commit
2019-09-13 16:03:22 -07:00
Connor Rigby
be1c6dc869
Add basic support for the express firmware target ( #718 )
...
* Initital setup for FarmbotExpress
* Update farmbot-arduino-firmware commit ref
2019-09-13 16:03:21 -07:00
Connor Rigby
9a6857bf98
Add new sys_calls to test_sys_calls
2019-09-13 16:03:20 -07:00
Connor Rigby
f44e396e9a
Fix typo in sys_calls module
...
Fixes #702
2019-09-13 16:03:20 -07:00
Connor Rigby
80b57917f9
Fix _if using named_pin
2019-09-13 16:03:19 -07:00
Connor Rigby
700d875e3a
Fix move_relative and move_abs coordinate math
2019-09-13 16:03:19 -07:00
Connor Rigby
cb1c8b43ad
Implement factory_reset sys_call
2019-09-13 16:03:19 -07:00
Connor Rigby
1b31c32b3d
Implement change_ownership sys_call
...
This required some changes to NervesHub because of there
being a brief moment after changing ownership where there
are no certs.
2019-09-13 16:03:19 -07:00
Connor Rigby
4f74887990
Implement get_toolslot syscall and fix parameter typos
2019-09-13 16:03:19 -07:00
Connor Rigby
68e15bcce1
Firmware command updates
...
Fixes `toggle_pin`
Fixes some unknown parameters
2019-09-13 16:03:19 -07:00
Connor Rigby
db799f5d64
Update nerves-hub and add check_update sys_call
2019-09-13 16:03:19 -07:00
Connor Rigby
f0c8fed4d8
Implement estop and eunlock syscalls
2019-09-13 16:03:19 -07:00