Pin state reporting of all pins. Flash optimization.

- New pin state realtime reporting feature. Instead of `Lim:000` for
limit state reports, the new feature shows `Pin:000|0|0000`, or
something similar. The `|` delimited fields indicate xyz limits, probe,
and control pin states, where 0 is always not triggered, and 1 is
triggered. Invert masks ARE accounted for.
  Each field may be enabled or disabled via the `$10` status report
setting. The probe and control pin flags are bits 5 and 6, respectively.

- Remove the now deprecated `REPORT_CONTROL_PIN_STATE` option in
config.h

- The old limit pin reports `Lim:000` may be re-enabled by commenting
out `REPORT_ALL_PIN_STATES` in config.h.

- Incremented the version letter (v1.0c) to indicate the change in
reporting style.

- Replaced all bit_true_atomic and bit_false_atomic macros with
function calls. This saved a couple hundred bytes of flash.
This commit is contained in:
Sonny Jeon
2015-11-09 21:54:26 -07:00
parent b9c3461932
commit 5eee10845b
16 changed files with 182 additions and 63 deletions

View File

@ -164,10 +164,10 @@ ISR(SERIAL_RX)
// Pick off realtime command characters directly from the serial stream. These characters are
// not passed into the buffer, but these set system state flag bits for realtime execution.
switch (data) {
case CMD_STATUS_REPORT: bit_true_atomic(sys_rt_exec_state, EXEC_STATUS_REPORT); break; // Set as true
case CMD_CYCLE_START: bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); break; // Set as true
case CMD_FEED_HOLD: bit_true_atomic(sys_rt_exec_state, EXEC_FEED_HOLD); break; // Set as true
case CMD_SAFETY_DOOR: bit_true_atomic(sys_rt_exec_state, EXEC_SAFETY_DOOR); break; // Set as true
case CMD_STATUS_REPORT: system_set_exec_state_flag(EXEC_STATUS_REPORT); break; // Set as true
case CMD_CYCLE_START: system_set_exec_state_flag(EXEC_CYCLE_START); break; // Set as true
case CMD_FEED_HOLD: system_set_exec_state_flag(EXEC_FEED_HOLD); break; // Set as true
case CMD_SAFETY_DOOR: system_set_exec_state_flag(EXEC_SAFETY_DOOR); break; // Set as true
case CMD_RESET: mc_reset(); break; // Call motion control reset routine.
default: // Write character to buffer
next_head = serial_rx_buffer_head + 1;