Commit Graph

64 Commits (1047f56e1ce36bbca770668f34638a2333d36625)

Author SHA1 Message Date
Rick Carlino 446aeb007d Add `pullout_direction` to points table 2020-04-12 12:33:37 -05:00
Rick Carlino 63d03599dd Remove unused variables. Add tests for FarmbotCore.Project 2020-04-02 13:24:04 -05:00
Rick Carlino a8fa3044b5 TODO: Composable query 2020-02-24 14:50:57 -06:00
Rick Carlino 6299407bc2 Add `criteria` column to PointGroup asset 2020-02-21 14:57:07 -06:00
Rick Carlino 9d932c8025 v9.1.2-rc5 2020-02-20 15:46:29 -06:00
Rick Carlino 7e3c252eeb Tests for gantry mounted tools 2020-02-19 12:42:25 -06:00
Rick Carlino 291a254059 Use Repo.query instead 2020-02-18 20:16:07 -06:00
Rick Carlino aac4244b90 Use raw SQL to prevent syntax errors in legacy migration 2020-02-18 20:11:40 -06:00
Rick Carlino 26fdbe1502 Formatting fix 2020-02-18 18:39:00 -06:00
Rick Carlino a56d381959 Possible implementation. Needs tests. 2020-02-18 18:35:57 -06:00
Rick Carlino d6b7ee774d === Begin testing new firmware fixes 2020-02-17 18:02:37 -06:00
Rick Carlino a916fbd51d v9.1.0-rc17 2020-02-12 20:20:42 -06:00
Rick Carlino f457e320f8 v9.1.0-rc15, with migration 2020-02-12 14:49:52 -06:00
Rick Carlino 5722bea421 Huge formatting update (sorry) 2020-01-17 09:58:53 -06:00
Rick Carlino b9e65aa503 Add `needs_reset` field (bool) to devices table. 2019-12-19 13:18:34 -08:00
connor rigby e36f98afc0 Update all places where params are listed 2019-12-18 06:33:30 -08:00
Connor Rigby 0257ef6c4d Add `mounted_tool_id` to `devices` table
WARNING: This modifies a previous migration
2019-12-16 08:35:58 -08:00
connor rigby 2ae369a710 Add `ota_hour` to `device` 2019-11-14 10:36:49 -08:00
Connor Rigby 2867fcce2a Implement some storting algos for points and point_groups 2019-10-22 14:19:32 -07:00
connor rigby 328feb3d14 Add point.discarded_at 2019-10-22 14:19:32 -07:00
Connor Rigby d3e51996b0 Add new resource: PointGroup 2019-10-22 14:19:32 -07:00
Connor Rigby 0c85cf2e27 Force firmware to be flashed 2019-10-22 14:19:32 -07:00
Connor Rigby 10aef6b1c7 Add migration for new firmware params 2019-09-24 12:47:08 -07:00
connor rigby 2f36e2d564 Update NervesHub client to save some meta about updates to the FB API 2019-09-18 12:45:01 -07:00
Connor Rigby cf433f62bc
Add aliased module for FirstPartyFarmware 2019-09-13 16:03:31 -07:00
Connor Rigby 1d0300c92e
Cleanup settings migration
This just removes some more config values that aren't used anymore.
Not critical enough to warrant a new migration
2019-09-13 16:03:31 -07:00
Connor Rigby c35b81decb
Add new table public_keys
This will be to load new ssh keys onto a device to allow
remote console for debugging over a network
2019-09-13 16:03:30 -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
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 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 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 f893611dd0
Consolidate NervesHub logic and implementation 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 0a9c664d17
Update farmbot-arduino-firmware submodule to be built in
farmbot_firmware app
2019-09-13 16:03:17 -07:00
Rick Carlino 016ea36f34
🎉 FarmEvent variables ✔️ 2019-09-13 16:03:17 -07:00
Rick Carlino 399ddf50c8
PersistentRegimen => RegimenInstance 2019-09-13 16:03:17 -07:00
Rick Carlino 18731e295d
Add `body` attribute to Regimen asset 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
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 af7b9e3359
Add seeds, Add FarmbotFirmware back to core 2019-09-13 16:03:16 -07:00
Connor Rigby 981dee6fef
Update enigma schema to match other asset schema
This is because we need to hook the Enigma AssetWorker up to the
existing AssetWorker system. It expects some keys to exist including
`updated_at` and `created_at`
2019-09-13 16:03:16 -07:00
Rick Carlino acf4de0671
Add enigmas table / private asset 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
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 5e864a35a9
Update rpi3 system and CI Config 2019-09-13 16:03:15 -07:00
Connor Rigby bad07b3bc3
Update movement rpcs to support tools and points 2019-09-13 16:03:14 -07:00