clean a few things up

pull/253/head
connor rigby 2017-02-21 07:41:02 -08:00
parent b0a15a5daa
commit 2a180ec155
6 changed files with 10 additions and 2587 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ Makefile.bac
/release-*
images
Makefile

113
Makefile
View File

@ -1,113 +0,0 @@
# THIS FILE WAS GENERATED BY `build_makefile.exs`
# 554ae5b
# Mon Feb 20 06:47:02 2017 -0800
# bump-version
default: rpi3
dev_env:
export MIX_ENV=dev
prod_env:
export MIX_ENV=prod
clean:
$(info Cleaning)
rm -rf apps/NERVES_SYSTEM_*
rm -rf apps/farmbot/_images
rm -rf apps/nerves_system_br
rm -rf deps
rm -rf _build
test: dev_env
scripts/run_tests.sh
## End default portion.
## begin rpi portion.
## rpi env
env-rpi: prod_env
export NERVES_TARGET=rpi
## rpi build
rpi: env-rpi system-rpi firmware-rpi
$(info Building stuff for rpi)
## rpi create-build
create-build-rpi:
scripts/clone_system.sh rpi
## rpi system
system-rpi: create-build-rpi
$(info Building Linux System for rpi)
scripts/build_system.sh rpi
## rpi firmware
firmware-rpi:
$(info Building Firmware for rpi)
scripts/build_firmware.sh rpi
release-rpi: rpi
scripts/build_release_images.sh rpi 3.0.6-staging.1
## end rpi portion.
## begin rpi3 portion.
## rpi3 env
env-rpi3: prod_env
export NERVES_TARGET=rpi3
## rpi3 build
rpi3: env-rpi3 system-rpi3 firmware-rpi3
$(info Building stuff for rpi3)
## rpi3 create-build
create-build-rpi3:
scripts/clone_system.sh rpi3
## rpi3 system
system-rpi3: create-build-rpi3
$(info Building Linux System for rpi3)
scripts/build_system.sh rpi3
## rpi3 firmware
firmware-rpi3:
$(info Building Firmware for rpi3)
scripts/build_firmware.sh rpi3
release-rpi3: rpi3
scripts/build_release_images.sh rpi3 3.0.6-staging.1
## end rpi3 portion.
## begin rpi2 portion.
## rpi2 env
env-rpi2: prod_env
export NERVES_TARGET=rpi2
## rpi2 build
rpi2: env-rpi2 system-rpi2 firmware-rpi2
$(info Building stuff for rpi2)
## rpi2 create-build
create-build-rpi2:
scripts/clone_system.sh rpi2
## rpi2 system
system-rpi2: create-build-rpi2
$(info Building Linux System for rpi2)
scripts/build_system.sh rpi2
## rpi2 firmware
firmware-rpi2:
$(info Building Firmware for rpi2)
scripts/build_firmware.sh rpi2
release-rpi2: rpi2
scripts/build_release_images.sh rpi2 3.0.6-staging.1
## end rpi2 portion.
## Release will build all the systems.
release: clean release-rpi release-rpi3 release-rpi2

View File

@ -20,9 +20,17 @@ clean:
\t$(info Cleaning)
\trm -rf apps/NERVES_SYSTEM_*
\trm -rf apps/farmbot/_images
\trm -rf apps/farmbot/npm-debug*
\trm -rf apps/farmbot/doc
\trm -rf apps/farmbot/erl_crash.dump
\trm -rf apps/farmbot/node_modules
\trm -rf apps/farmbot/cache
\trm -rf apps/nerves_system_br
\trm -rf deps
\trm -rf _build
\trm -rf images
\trm -rf doc
\trm -rf erl_crash.dump
test: dev_env
\tscripts/run_tests.sh

View File

@ -1,91 +0,0 @@
# Problem
* we need a way to manage processes between the frontend and the bot
* Obviously not EVERY process, but just a small subset of them
* Farmware, Sequences, Regimens and FarmEvents
* Preferable an interface that can be used to represent all of these things
without being too specific to any, but not to generic to be useful.
we could lay it out in a number of ways
```js
{
process_info: {
"water plants erry day": {
type: "regimen",
status: "OK"
},
"something else":{
type: "event",
status: "failed"
},
"plant detection": {
type: "farmware",
status: "maybe not string typing"
}
}
}
```
and then have `celery_script` commands:
```js
{
kind: "start_process",
args: {name: "water plants erry day"}
}
{
kind: "stop_process",
args: {name: "water plants erry day"}
}
```
this looks nice, but also deals with strings which is kind of scary.
Plus they need to be converted into Atoms on the bot, which is technically
frowned upon.
it could also be organized as:
```js
{
process_info: {
events: [{name: "something user friendly", process_id: 13, status: "running"}],
regimens: [{name: "water teh plantzz", process_id: 1234, status: "more string typing here?"}],
farmwares: [{name: "plant-detection", process_id: 2, status: "completely broken"}]
}
}
```
then the `celery_script`s would look like
```js
{kind: "start_process", args: {process_id: 13}}
{kind: "stop_process", args: {process_id: 2, reason: "maybe we dont want a reason"}}
```
```js
{
// these are the "user accessable" processes. things can only be started if they
// are indexed in here.
process_info: {
events: [
{name: "user friendly tag?", uuid: "1234-asdf-1111", status: "running"},
{name: ":+1:", uuid: "6767-1234-asdf", status: "fuuuuu"}
],
regimens: [
{name: "water plants @ 4:00 pm", uuid: "1111-aaaa-1234", status: "failed"}
],
farmwares: [
{name: "herp derp", uuid: "1234-abcd-6789", status: "nothing to see here"}
]
}
}
// celery script nodes would be
{
kind: "start_process", args: {uuid: "1234-abcd-6789"}
}
{
kind: "stop_process", args: {uuiid: "1234-asdf-1111"}
}
```

View File

@ -5,4 +5,5 @@ export MIX_TARGET=$SYSTEM
echo "building firmware for $SYSTEM"
cd apps/farmbot
mix deps.get
npm instlal
mix firmware

2383
slow.json

File diff suppressed because it is too large Load Diff