connor rigby
b7f52821d3
Silence SSH start/stop logs
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
a6f365b4c0
Implement public_key worker
2019-09-13 16:03:30 -07:00
Connor Rigby
e80ae41b6b
Remove extra configs from dnsmasq
...
Should hopefully redirect all traffic to the captive portal
2019-09-13 16:03:29 -07:00
Connor Rigby
01c3723877
Fix LEDs and Pinbindings working intermitently
...
The Internal pullups need to be disabled for the
FarmBot gpio hat to work properly
2019-09-13 16:03:29 -07:00
connor rigby
2a94485e3d
Add child_spec to FarmbotCore.Led
...
Allows LED handler to start _before_ farmbto_os starts
2019-09-13 16:03:29 -07:00
connor rigby
6c4cb19e58
Update vintage_net
2019-09-13 16:03:29 -07:00
connor rigby
d429aeefa6
Add led handler for starting configurator
2019-09-13 16:03:29 -07:00
connor rigby
e199cb8a90
Add LED handler for green (sync status)
2019-09-13 16:03:29 -07:00
connor rigby
1425d488ed
Remove dependency on IW and set regulatroy domain to world at boot
...
* VintageNet now has the ability to scan in ap mode
* Set regulatroy domain to `world` at boot, and change to US after
configuration
2019-09-13 16:03:29 -07:00
connor rigby
9e27436a50
Fix router render errors
2019-09-13 16:03:29 -07:00
connor rigby
30ad8542e6
Fix changing unrelated settings flashing firmware
2019-09-13 16:03:29 -07:00
Connor Rigby
e83b20b5bc
Move NTP check to when an interface comes up
...
This will lead to a few dropped sync requests, but
should hopefully stabalize NTP starting
2019-09-13 16:03:29 -07:00
connor rigby
14c23709f9
Update elixir-iw wrapper
2019-09-13 16:03:29 -07:00
Connor Rigby
e6c7c6e0aa
Add a hack to use `iw` instead of VintageNet for now
2019-09-13 16:03:29 -07:00
Connor Rigby
256899b3da
Fix network panel of configurator having one interface selected
2019-09-13 16:03:28 -07:00
Connor Rigby
4d163b4ac7
Only try to connect to NervesHub once
2019-09-13 16:03:28 -07:00
Connor Rigby
99341b73f0
Kill kmsg_tailer after `:nerves_hub` exits
2019-09-13 16:03:28 -07:00
Connor Rigby
c8813e042a
Add debug symbols to `:dev` releases
2019-09-13 16:03:28 -07:00
Connor Rigby
8d9276b355
Fix setup.farm.bot alias
2019-09-13 16:03:28 -07:00
Connor Rigby
c16b165c21
Fix missing mac_address in configurator
2019-09-13 16:03:28 -07:00
Connor Rigby
bd46e23e65
Sort networks in configurator by signal strength
2019-09-13 16:03:28 -07:00
Connor Rigby
90d5a9d88d
Integrate with new ip reporting api form VintageNet
...
Pulls in changes from https://github.com/nerves-networking/vintage_net/pull/81
2019-09-13 16:03:28 -07:00
Connor Rigby
319c88b6ae
Fix overzealous firmware flashing with nerves-hub OTA
2019-09-13 16:03:28 -07:00
Connor Rigby
91e4b9e880
Add regimens and sequences to the scheduler debugger
2019-09-13 16:03:28 -07:00
Connor Rigby
49f67d1a0d
Fix NTP servers not being applied
2019-09-13 16:03:28 -07:00
connor rigby
eea9c480b6
Update nerves_system_rpi3 for rpi3a and rpi3b+
2019-09-13 16:03:28 -07:00
connor rigby
d48f9f9747
Fix execute_script getting stuck in a loop
2019-09-13 16:03:28 -07:00
Connor Rigby
4cfa47ddc2
Fix NervesHubClient using wrong credentials on a fresh image flash
2019-09-13 16:03:27 -07:00
Connor Rigby
3569a21c72
Update to elixir 1.9
2019-09-13 16:03:27 -07:00
Connor Rigby
82d7bedf7b
Update nerves related dependencies
...
* distillery
* nerves
* nerves_firmware_ssh
* nerves_hub
* nerves_hub_cli
* nerves_hub_user_api
* nerves_runtime
* shoehorn
* toolshed
2019-09-13 16:03:27 -07:00
Connor Rigby
1c45c4f4b9
Add feature to send logs to configurator
2019-09-13 16:03:27 -07:00
gabrielburnworth
ab1b8bbda5
add farmware execution rpc debug logs
...
Fix AMQP and network disconnects causing limbo state
2019-09-13 16:03:27 -07:00
gabrielburnworth
62a101dc9c
Fix some farmware bugs
2019-09-13 16:03:27 -07:00
Connor Rigby
d7cd92879c
Allow NTP servers to be configured
2019-09-13 16:03:27 -07:00
Connor Rigby
bd9da27f1d
Build a helpful scheduler debugger
...
Will display all the scheduled events in real time
2019-09-13 16:03:27 -07:00
Gabriel Burnworth
9469d47f9f
Fix shutdown not powering off
2019-09-13 16:03:27 -07:00
connor rigby
7a7dde4af0
Update network factory reset log
2019-09-13 16:03:26 -07:00
Connor Rigby
1900bdba57
Allow firmware to be open/flashed infinity times
...
* add `infinity` as an option for `fbos_config_worker` and
`firmware_open_task`
* reenable uevent montior flashing/opening firmware
2019-09-13 16:03:26 -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
3d9be8d902
Silence repeating firmware open log
2019-09-13 16:03:26 -07:00
Connor Rigby
fa96e2c8fd
Remove Farmbot Logger colors
...
* Fixes espeak trying to speak ansi colors
* allows espeak to be specified as the sole channel
2019-09-13 16:03:26 -07:00
Connor Rigby
0ea5a4ec10
Remove annoying network log
2019-09-13 16:03:26 -07:00
connor rigby
11193eb077
Some configurator tweaks
2019-09-13 16:03:26 -07:00
connor rigby
a19634ef29
Silence unknown tty log
2019-09-13 16:03:26 -07:00
connor rigby
2b0ea838af
Try to prevent feedback looping in firmware flash
2019-09-13 16:03:25 -07:00
connor rigby
712256a1a3
Implement task for opening the firmware
...
Adds a new flag for `firmware_needs_open` and a task that polls that
value with a bit of state to open the firmware tty
2019-09-13 16:03:25 -07:00
Connor Rigby
b525ee193f
Force a firmware flash after an OTA update
2019-09-13 16:03:25 -07:00
Connor Rigby
6bb75de021
Allow flashing firmware at runtime
...
* Moves tty detector to farmbot_core
* Update elixir config to reflect this
* Update `flash_firmware` rpc to not circularly flash firmware
2019-09-13 16:03:25 -07:00
Connor Rigby
ce51edeb99
Revert Alert/Enigma system
...
* Revert 9cc461b512
* Revert 7309a19fe7
* Revert 7fd82d3a58
* Revert 890ddfbd86
* Revert 839ce3e470
* Revert 68cc8e6471
* Revert 3991a2c516
* Revert db8da31018
2019-09-13 16:03:25 -07:00
Connor Rigby
168d466f28
Reenable espeaking logs
...
Add a new logger backend that gets enabled on boot. Could probably be
added at compile time.
2019-09-13 16:03:25 -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
69425388e2
Update elixir logger config
...
Host mode no longer needs to call `RingLogger.attach()`
and prod images now log otp errors
2019-09-13 16:03:25 -07:00
connor rigby
73bd1e7fc8
Update log for factory reseting
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
915a35b594
Add helper script for hot code reloading via HTTP
2019-09-13 16:03:24 -07:00
connor rigby
c54bac2e34
Silence annoying wifi scan log
2019-09-13 16:03:24 -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
6b8f884cc3
Update configurator completion message
...
Gives an aproximate time when Farmbot will reset
back into configurator
2019-09-13 16:03:24 -07:00
Connor Rigby
9f8f53b532
Implement shoehorn handler for when core farmbot stack exits
2019-09-13 16:03:24 -07:00
Connor Rigby
d52aa2e39a
Reenable factory reset from network disconnects
2019-09-13 16:03:24 -07:00
Connor Rigby
6f5615fff4
Fix reporting WiFi signal
...
* Adds new `informational_settings` field: `wifi_level_percent`.
This uses the built in vintage_net algorithm to accurately determine
percentage
2019-09-13 16:03:24 -07:00
Connor Rigby
0b52aafed6
Fix invalid regex in detecting update_channel
2019-09-13 16:03:24 -07:00
Connor Rigby
ffa1ebeebc
Add colors to RingLogger
2019-09-13 16:03:24 -07:00
connor rigby
c9481ab3d2
Keep the current state of NervesHub `update_channel` and `tags`
...
* This fixes booting on the wrong release (from the view of NervesHub)
causing reboot loops
2019-09-13 16:03:24 -07:00
Connor Rigby
f9d1c5c94c
Fix calibration params appearing to fail at saving
2019-09-13 16:03:23 -07:00
Connor Rigby
46dbed37ff
Remove LoggerBackendSqlite.
...
This needs to be done because disk logging uses too much
I/O that the raspberry pi just doesn't have cpu cycles to
spend.
* Cleanup config.exs entries for farmbot_os
* Update RingLogger
2019-09-13 16:03:23 -07:00
Connor Rigby
31fdd0ef44
Update Network connecting to retry when failures happen
2019-09-13 16:03:23 -07:00
Connor Rigby
4e2592c3b3
Fix the network_not_found timer message signatures
...
* Update log messages for network connect/disconnects
2019-09-13 16:03:23 -07:00
Connor Rigby
a6f1552470
Reenable erlang distribution
2019-09-13 16:03:23 -07:00
Connor Rigby
f0211dd9d7
Replace Nerves.Network with VintageNet
2019-09-13 16:03:23 -07:00
Connor Rigby
d6925b1541
Write some tests for configurator
2019-09-13 16:03:23 -07:00
Connor Rigby
92fef18b62
Move configurator back to first class of `farmbot_os`
...
* Configurator HTTP endpoing is now always started
* data access is now a behaviour for configurator
* Will allow for independent testing with mox
* network access is now a behaviour for configurator
* Will allow for independent testing with mox
2019-09-13 16:03:23 -07:00
Connor Rigby
2d1fea5377
First pass at validating network config with VintageNet
2019-09-13 16:03:23 -07:00
Connor Rigby
0212e378de
Add vintage_net as a dependency
...
* Update deps for farmbot_os app
2019-09-13 16:03:23 -07:00
Connor Rigby
48c194f68f
Remove Nerves.Network and friends
2019-09-13 16:03:23 -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
e6b29ea559
Refactor CeleryScript execution
...
* FarmEvents now schedule all events up front
* Executions are stored in the database
* Regimens now schedule all items up front
* Executions are stored in the database
* fix Deleting a FarmEvent with a running RegimenInstance
* `execute`int and `schedule`ing a CeleryScript are not separate things
* Everywhere `scheduling` and `executing` CeleryScript updated to use
the new API
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
Rick Carlino
b619cb3576
Add scafold tests for celery_script_channel
...
* Test case: `celery_script_channel` `start_link`
2019-09-13 16:03:22 -07:00
Connor Rigby
2d66f09485
Enable `warnings_as_errors` for each app
2019-09-13 16:03:21 -07:00
Connor Rigby
49102ca5fd
Update nerves systems
2019-09-13 16:03:21 -07:00
Connor Rigby
32580bf2ef
Fix firmware missing alert_helper not using package name
2019-09-13 16:03:21 -07:00
Connor Rigby
317270dbb9
Update NervesHub
...
This also fixes a bug where updates would _allways_ be applied
2019-09-13 16:03:21 -07:00
Connor Rigby
3325a8592f
Update rpi system
2019-09-13 16:03:21 -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
8526027bb8
Update all systems to 1.7.2
2019-09-13 16:03:20 -07:00
Rick Carlino
4248c93962
Add mox and excoveralls
...
* and tests for AutoSyncChannel
* add tests for auto sync preloader
2019-09-13 16:03:20 -07:00
connor rigby
5bdee16d36
Fix compiler error in farmbot_os from new preloader behaviour
2019-09-13 16:03:20 -07:00
connor rigby
ac2a5a67e9
Add coveralls aggregator
2019-09-13 16:03:20 -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
39864006cb
Update SQLITE repos to only have one pool process.
2019-09-13 16:03:20 -07:00
Connor Rigby
f893611dd0
Consolidate NervesHub logic and implementation
2019-09-13 16:03:20 -07:00
Connor Rigby
5c41f5226b
Add new worker for rpi throttled
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
199e1edb97
Rename Enigma to Alert
2019-09-13 16:03:19 -07:00
Connor Rigby
29645ea150
Allow multi-configurations to not break the bot
2019-09-13 16:03:19 -07:00
Connor Rigby
c9fb352294
Clean up IO.inspect/2 calls
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
00003c2a96
Implement dump_info sys_call
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
2c73a9b2d8
Update job_progress to not use atoms
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
1d535e8951
Fix LEDs
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
a9e4d9fe54
Update reload task
2019-09-13 16:03:19 -07:00
Connor Rigby
cc87c7e923
Add `author` to enigma problem_tag format
2019-09-13 16:03:19 -07:00
Connor Rigby
df4cb27945
Fix asset module returning `:ok` instead of the updated asset
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
d81fecd355
Update farmbot_os config.exs entries
2019-09-13 16:03:18 -07:00
Connor Rigby
2d56e41681
Clean up enigma_firmware_missing module
2019-09-13 16:03:18 -07:00
Connor Rigby
c2508f312e
Add `ring_logger` to deps
2019-09-13 16:03:18 -07:00
Connor Rigby
3dcc8af3aa
Fix gpio handler causing bootloop issues
2019-09-13 16:03:18 -07:00
Connor Rigby
d517ebe5ff
Update circuits_gpio_handler to use new circuits message signature
2019-09-13 16:03:18 -07:00
Connor Rigby
5713d7bd60
Fix network supervisor to start epmd and distribution
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
Connor Rigby
dc06987553
Update config entries to start tty_detector
2019-09-13 16:03:18 -07:00
Connor Rigby
392dd66c91
Update configurator router and network manager
2019-09-13 16:03:18 -07:00
Connor Rigby
966ad22f3e
Update networking/configurator deps
2019-09-13 16:03:18 -07:00
Connor Rigby
96b0c37a2b
Delete old pin_binding code
2019-09-13 16:03:18 -07:00
Connor Rigby
a228805caa
Update AMQP to 1.1.1
2019-09-13 16:03:18 -07:00
Connor Rigby
233b487ca2
Fix compiler warning in host configurator
2019-09-13 16:03:18 -07:00
Connor Rigby
4af6a098c5
Fix compiler warning
2019-09-13 16:03:17 -07:00
connor rigby
0a9c664d17
Update farmbot-arduino-firmware submodule to be built in
...
farmbot_firmware app
2019-09-13 16:03:17 -07:00
connor rigby
59c17cab4e
Update deps
2019-09-13 16:03:17 -07:00
Connor Rigby
4b4de1c2c4
quiet down tty detector
2019-09-13 16:03:17 -07:00
Rick Carlino
399ddf50c8
PersistentRegimen => RegimenInstance
2019-09-13 16:03:17 -07:00
Rick Carlino
295cb45d49
Transport => Channel
2019-09-13 16:03:17 -07:00
connor rigby
d842c3a123
🎉 Implement Variables in Regimen
2019-09-13 16:03:17 -07:00
Connor Rigby
e80780aeb8
Remove EnigmaWorker in favor of db context hooks
...
* Add firmware_hardware setter on bot_state
* move firmware side effects to farmbot_core
* move firmware estop timer to farmbot_core
* change enigmas to be soft delete
2019-09-13 16:03:17 -07:00
Rick Carlino
673d8a834c
Add docs to modules that were missing them
2019-09-13 16:03:17 -07:00
Connor Rigby
0a55aa4cc3
Fix host only race condition causing token to delete itself
2019-09-13 16:03:17 -07:00
Connor Rigby
13ae06cf17
Backport elixir 1.8 + elixir_make 0.5 hacks from `staging`
2019-09-13 16:03:17 -07:00
connor rigby
16c9f8d62f
Fix test env config.exs
2019-09-13 16:03:17 -07:00
Connor Rigby
d4245cf2df
Fix/update dirty worker
2019-09-13 16:03:17 -07:00
Connor Rigby
b7f4ebba57
Fixes for bootstrapping firmware.
...
* TTYDetector no longer causes side effects
* add new RPC for `flash_firmware` that takes a `package` arg
2019-09-13 16:03:17 -07:00
Rick Carlino
aa9ad9523a
Update EnigmaWorker to not die causing supervisor restarts.
...
* Tests for enigma cleanup
2019-09-13 16:03:17 -07:00
Rick Carlino
0b5df60f67
Implement and test Enigmas for firmware_missing
...
* Test for create_or_update_enigma!() and clear_enigma()
2019-09-13 16:03:17 -07:00
Rick Carlino
17d24bdc0e
Begin impl of firmware flasher RPC, add `clear_enigma` helper
2019-09-13 16:03:16 -07:00
Connor Rigby
d2c5a1a72b
Add enigma_worker config to farmbot_ext and frambot_os
2019-09-13 16:03:16 -07:00
Rick Carlino
cfa86293a4
Refactor fbos_config_worker_test to be less prone to races
2019-09-13 16:03:16 -07:00
Rick Carlino
af7b9e3359
Add seeds, Add FarmbotFirmware back to core
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
218b33785d
Fix more namespaces
2019-09-13 16:03:16 -07:00
Connor Rigby
95bd827518
Rename FarmbotOS namespace
2019-09-13 16:03:16 -07:00
Connor Rigby
21bb1a6f25
Misc cleanup and bug fixes.
...
* Fixes botstate changes being dispatched as nested lists
* Fixes jwt failing to decode `nil`. Doesn't fix token actually being`nil` though.
* Adds a syscall for read_pin
* Add/fix calibrate syscall
* tweak tty detector. This is still broken i think
2019-09-13 16:03:16 -07:00
Connor Rigby
4114e26804
Implement new CeleryScript Runtime environment.
...
This is obviously a rather large change warranting an essay describing
it.
A Brief overview
Basically the old implementation had quite a few down sides preventing
it from really working as intended, especially with the addition of the
variables feature. Here is the shortlist of things that needed
addressing:
* No scoping between sequences.
What this essentially means is that a sequence that executes another
sequence is unable to add data to the calle. This is important for using
Variables.
* Error recovery
certain nodes have a high likelyhood of failing such as anything that
interfaces the firmware. Much focus was spent ensuring that errors would
be recoverable when desired.
* Complexity of control flow asts versus action asts.
Nodes such as `if` will always work in the same way regardless of the
state of the rest of the system meaning there is no reason for it to
have a special implementation per environment. on the other hand
`move_absolute` is bound to a specific part of the system. Seperating
these concerns allows for better testing of each piece independently.
A More In Depth overview
The core of this change resolves around 1 really big change resulting in
many more small changes. This change is the CeleryScript `compiler`. The
TLDR of this system is that now CeleryScript ASTs are deterministicly
compiled to Elixir's AST and executed. Doing this has some big benifits
as described below.
1) CeleryScript "runtime" environment is now much simpiler in favor of a somewhat
complex "compile time" environment. Basically instead of EVERY single
CeleryScript AST having a custom runtime implementation, only a subset
of ASTs that require external services such as the Firmware, Database,
HTTP, etc require having a runtime implementation. This subset of ASTs
are called `SysCalls`. Also the runtime implementations are compiled to
a single function call that can be implemented instead of needing to
have a contextual environment and making decisions at runtime to
evaluate variables and the like.
2) Static analysis is now possible. This means an incorrectly crafted
sequence can be validated at compile time rather than getting half way
through a sequence before finding the error.
3) Having the "external services" separated leads to better plugability.
There is now a behaviour to be implemented for the subset of syscalls
that are system specific.
2019-09-13 16:03:15 -07:00
connor rigby
a28b6c4141
Variable resolution works?
2019-09-13 16:03:15 -07:00
connor rigby
09be64fe4e
Fix AMQP issue with hanging forever
2019-09-13 16:03:15 -07:00
connor rigby
d0edb1e19e
Update to Elixir 1.8!!
2019-09-13 16:03:15 -07:00
connor rigby
a2339546e1
Update farmbot_os app to support eap + cleanup
2019-09-13 16:03:15 -07:00
Connor Rigby
bb7306dabc
Work towards refactoring Farmware
...
* Add bot state serializer to filesystem
* Add helper to turn ecto types into TSC types
* Add module to extract ecto changes as a list of instructions
* Add new transport for bot_state_ng
* Update CSVM Runtime to poll until `await` can complete
2019-09-13 16:03:15 -07:00
connor rigby
d17f64f17f
Misc app cleanup and updates
...
* Add helpful Makefile task for fetching deps
* Remove dead nerves_hub code
* Update deps
2019-09-13 16:03:15 -07:00
Connor Rigby
5e864a35a9
Update rpi3 system and CI Config
2019-09-13 16:03:15 -07:00
Connor Rigby
f7b573e6d5
Update celery_script
...
Support peripherals in read and write pin
2019-09-13 16:03:15 -07:00
Connor Rigby
4216eb401f
Fix deps for rpi
2019-09-13 16:03:15 -07:00
Connor Rigby
d3b9f9c83a
Update nerves_hub_client logs
2019-09-13 16:03:14 -07:00
Connor Rigby
ee3a88a6dd
Add ability to configure tty names per target
2019-09-13 16:03:14 -07:00
Connor Rigby
bad07b3bc3
Update movement rpcs to support tools and points
2019-09-13 16:03:14 -07:00
Connor Rigby
ce84310050
Fix Firmware crashes blocking forever
2019-09-13 16:03:14 -07:00
Connor Rigby
8f3abc335a
Update NervesHub logs and abstractions
2019-09-13 16:03:14 -07:00
Connor Rigby
cf5077e2a9
Start implementing firmware startup
...
Misc other cleanup
2019-09-13 16:03:14 -07:00
Connor Rigby
7cde2b2390
Change to ElixirCircuits.
2019-09-13 16:03:14 -07:00
Connor Rigby
65436cd367
Update config files
2019-09-13 16:03:14 -07:00
Connor Rigby
56f6749595
Nerves hub pt2 ( #654 )
...
* Rework Networking
* Rework Configurator
* Fix NervesHub not connecting
2019-09-13 16:03:14 -07:00
Connor Rigby
451dfe1343
[WIP] Pull in NervesHub updates
2019-09-13 16:03:14 -07:00
Connor Rigby
6e2a018598
Implement Regimens again, add tests and test support
...
* This also includes changes to all Farmbot API Assets adding
a `monitor: :boolean` field. This allows tests to be run
causing minimal side effects on the rest of the systems.
2019-09-13 16:03:14 -07:00
Connor Rigby
f2b8abd692
Botstate refactor ( #645 )
...
* Refactor PinBindings
* Refactor logging to not require Farmbot.Registry
* Fix AMQP bot_state_transport and log_transport
* Update to use floats everywhere
* Refactor Farmbot.Firmware
* Write Firmware Tests
* dipping into FarmbotOS finally
* Cleanup peripheral_worker error message
* Implement remaining CeleryScript RPCs
* Refactor job progress
* Image Upload status notifications updates
* Fix compiler warnings and things
* Update Firmware submodule
* Fix FarmbotEXT tests
2019-09-13 16:03:14 -07:00
Connor Rigby
869d1ad1a4
Progress on refactoring data syncing ( #643 )
2019-09-13 16:03:13 -07:00
connor rigby
8c34f2eacd
Refactor farmbot application into separate folders/apps.
2019-09-13 16:03:13 -07:00
Connor Rigby
0d569301f1
Replace httpoison
2019-09-13 16:03:13 -07:00
Connor Rigby
6c9afd2533
Update circleci ?
2019-09-13 16:03:13 -07:00
connor rigby
10a4379568
Work toward farmware/celeryscript stuff
...
* Fix logger erros
* Fix migrations
* Fix compile errors
* Fix tzdata child_spec
2019-09-13 16:03:13 -07:00
Connor Rigby
bdb11b2ea8
Lots of work on Farmware
2019-09-13 16:03:13 -07:00
connor rigby
66bb4e51f4
Update nerves_time
2019-09-13 16:03:13 -07:00
connor rigby
e63683c500
Update Elixir version in circleci config.
2019-09-13 16:03:13 -07:00
connor rigby
d7ff13422c
Test Migration
2019-09-13 16:03:13 -07:00
connor rigby
32f46b5fd3
Start refactoring Farmware
2019-09-13 16:03:13 -07:00
connor rigby
358a1e209e
Update AMQP workers to reconnect on a 4 second timer
...
Pull in new csvm implementation
Update circleci config
Implement syncing and write_pin
add migration for syncing
add saftey to write_pin
Implement read_pin
Implement set_servo_angle
Implement more ast nodes
Implement e-stop and e-unlock
Fix a bunch of stuf
Fix missing assets on boot/init
It actually works
Rename csvm -> farmbot_celery_script; fix initial sync/dispatch
Fix a bunch of small bugs
Identify problem
Fix Sqlite bug and increase performance by 10 times!!
Fix sequences inside of sequences
2019-09-13 16:03:13 -07:00
connor rigby
cf1ef23b17
Start splitting Farmbot Application Poncho Style
...
This begins splitting the monolithic Farmbot application
into separate, independent OTP applicatoins.
2019-09-13 16:03:13 -07:00