Commit Graph

25 Commits (c2b92722a88404b36a05e1e7f71fe69ad2ff6259)

Author SHA1 Message Date
Rick Carlino 8d7fb9a010 v9.3.0-rc0 (debugging possible OTA system bug) 2020-05-04 16:58:30 -05:00
Connor Rigby 528956dd07 Fix firmware_debug_logs and arduino_debug_messages being ignored
Don't know which of these params is supposed to be used for this
feature, so added both of them.
2019-12-16 08:35:58 -08:00
connor rigby 99f92c3298 Update Firmware IO logs 2019-11-05 13:09:40 -08:00
Connor Rigby 44bc196320 Add a timer that resets firmware_io logs after 5 minutes 2019-11-05 13:09:40 -08:00
Connor Rigby 2d3b7b0cf5 Add backoff timer to firmware flash 2019-11-05 13:09:40 -08:00
connor rigby 2f8a4a90e2 Update logs in fbos_config_worker again
* Add log for update channel
* Update log for auto factory reset to match frontend
2019-09-18 12:45:01 -07:00
connor rigby 50c28f5617 Update fbos_config logs to show exactly what things are updated 2019-09-18 12:45:01 -07:00
Connor Rigby d495e70541
Update hardware change log again 2019-09-13 16:03:32 -07:00
Connor Rigby c8da9d880e
Move firmware naming convetions into their own module 2019-09-13 16:03:32 -07:00
connor rigby 30ad8542e6
Fix changing unrelated settings flashing firmware 2019-09-13 16:03:29 -07:00
Connor Rigby 4bba6dea11
Allow a `none` option for fbos_config.firmware_hardware 2019-09-13 16:03:27 -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 2b0ea838af
Try to prevent feedback looping in firmware flash 2019-09-13 16:03:25 -07:00
connor rigby 0adcf68912
Allow firmware to be opened correctly for existing accounts
`firmware_path` and `firmware_needs_flash` = false is now handled
correctly
2019-09-13 16:03:25 -07:00
connor rigby bcf7feace7
Fix fbos_config_worker_test
The test was trying to open/flash the firmware device which
does not exist in the test env
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 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 c9fb352294
Clean up IO.inspect/2 calls 2019-09-13 16:03:19 -07:00
Connor Rigby 69c3322d12
Add new feature to asset_worker protocol
This sets up the ability for asset_workers to react to _changes_, rather than be restarted.
2019-09-13 16:03:18 -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 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 218b33785d
Fix more namespaces 2019-09-13 16:03:16 -07:00
Connor Rigby f1dd9009ea
Rename FarmbotCore Namespace 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