Commit Graph

31 Commits (5722bea4217d0f86a3952689dd28df7516ce245a)

Author SHA1 Message Date
Rick Carlino 5722bea421 Huge formatting update (sorry) 2020-01-17 09:58:53 -06:00
connor rigby b11faf93a4 Cleanup more syncing and firmware logs 2019-12-30 09:23:39 -08:00
Connor Rigby d65a54223c Fix Firmware flashing on boot on express boards 2019-12-26 10:37:23 -08:00
Connor Rigby 58659999df Start building a debug chart impl to view telemetry data 2019-10-31 14:00:08 -07:00
Connor Rigby a6f365b4c0
Implement public_key worker 2019-09-13 16:03:30 -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 f0211dd9d7
Replace Nerves.Network with VintageNet 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
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
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 199e1edb97
Rename Enigma to Alert 2019-09-13 16:03:19 -07:00
Connor Rigby 3dcc8af3aa
Fix gpio handler causing bootloop issues 2019-09-13 16:03:18 -07:00
Rick Carlino 399ddf50c8
PersistentRegimen => RegimenInstance 2019-09-13 16:03:17 -07:00
Connor Rigby d2c5a1a72b
Add enigma_worker config to farmbot_ext and frambot_os 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 95bd827518
Rename FarmbotOS 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
connor rigby d0edb1e19e
Update to Elixir 1.8!! 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 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 0d569301f1
Replace httpoison 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 d7ff13422c
Test Migration 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