aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvg <vg@devys.org>2018-02-14 15:01:34 +0100
committervg <vg@devys.org>2018-02-14 15:01:34 +0100
commit30c65c4075cdf45f6d1632909a9253435a5bdafc (patch)
treee0ac3a95f89e0f05359e4f7bd0e295d1db899491
parentc00ef4260f84611bf4ff35e2ca7f101046ca5cc7 (diff)
downloadavr-30c65c4075cdf45f6d1632909a9253435a5bdafc.tar.gz
avr-30c65c4075cdf45f6d1632909a9253435a5bdafc.tar.bz2
avr-30c65c4075cdf45f6d1632909a9253435a5bdafc.zip
update readme with serial commands and flowchart update to do
-rw-r--r--two_hosts_auto_powerswitch/readme.rst30
1 files changed, 28 insertions, 2 deletions
diff --git a/two_hosts_auto_powerswitch/readme.rst b/two_hosts_auto_powerswitch/readme.rst
index c0b6216..7eac7fe 100644
--- a/two_hosts_auto_powerswitch/readme.rst
+++ b/two_hosts_auto_powerswitch/readme.rst
@@ -14,7 +14,7 @@ case, the device is switched on by whatever computer is detected on.
Flowchart
=========
-When detecting a host state change, the following happen::
+Outlet table update::
.------------------. .-------------------.
@@ -32,6 +32,23 @@ When detecting a host state change, the following happen::
'---------------'
+Skip table:
+serial skip update -> update skip table
+computer state table update -> reset skip lines of updated computers
+
+Computer state table:
+Host state change detection -> lookup skip table -> update computer state table
+computer button toggle -> update computer state table
+serial logical computer state toggle -> update computer state table
+
+Outlet table:
+outlet toggle button -> update table
+computer state table update -> update table
+serial toggle command -> update table
+
+Outlet table update can start timer (doing eventually a relay switch on or off
+action), switch on relay directly, switch off relay directly.
+
Feature list
============
@@ -69,7 +86,7 @@ Feature list
* If at least one of the computers is on, global led is on. An individual led
indicate the state of each outlet.
-* Very low power then no outlet nor computer is on: the MCU will sleep and
+* Very low power when no outlet nor computer is on: the MCU will sleep and
consume near nothing and all led will be off.
* Instead of pressing button, the dedicated control usb connection can be used
@@ -82,6 +99,15 @@ Feature list
little current spikes), and keeping current state when unplugging
controlling computer.
+Serial commands
+===============
+
+- `CNY`: Change computer N (0/1) state to Y (0/1)
+- `TN`: Toggle computer N (0/1) state.
+- `cNY`: Change outlet N (0-4) state to Y (0/1)
+- `tN`: Toggle outlet N (0-4) state.
+- `SNY`: Update computer skip line to Y (0/1, 1 means skipping the next on
+ detection change).
Rationale
=========