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
Connor Rigby
3417870bb3
Implement fbos sys_calls
2019-09-13 16:03:19 -07:00
Connor Rigby
db54e2117d
Update find_home to not take a speed arg
2019-09-13 16:03:18 -07:00
Connor Rigby
98779ea000
Update sys_calls to return a string on error.
2019-09-13 16:03:18 -07:00
Rick Carlino
295cb45d49
Transport => Channel
2019-09-13 16:03:17 -07:00
Rick Carlino
cfa86293a4
Refactor fbos_config_worker_test to be less prone to races
2019-09-13 16:03:16 -07:00
Connor Rigby
1e7ae7a744
Finish implementing Farmware.
...
Farmware runtime seems to be working really well. The only
problem is currently the way Farmware is stored on the bot state
can not be properly serialized to the new method. This will require
a breaking change
2019-09-13 16:03:16 -07:00
connor rigby
b204ce3b9e
Add some work for Farmware
2019-09-13 16:03:16 -07:00
Connor Rigby
95bd827518
Rename FarmbotOS namespace
2019-09-13 16:03:16 -07:00