summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/remote.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-06-13 20:48:54 +0200
committerMichael Buesch <mb@bu3sch.de>2010-06-13 20:48:54 +0200
commitd03bf642e8285b0cf91855a66f8cdc0c642c6854 (patch)
treea8fe2551a0012e1f4420f7beb670e7fae0a2da1b /pressure_control/firmware/remote.c
parent102cbd589030183125e8430ca784c56968a47638 (diff)
downloadcnc-d03bf642e8285b0cf91855a66f8cdc0c642c6854.tar.xz
cnc-d03bf642e8285b0cf91855a66f8cdc0c642c6854.zip
pressure_control: Export maxima via serial interface
Also raise Z maximum Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'pressure_control/firmware/remote.c')
-rw-r--r--pressure_control/firmware/remote.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pressure_control/firmware/remote.c b/pressure_control/firmware/remote.c
index f54d4f5..172c5d0 100644
--- a/pressure_control/firmware/remote.c
+++ b/pressure_control/firmware/remote.c
@@ -312,6 +312,20 @@ static void handle_received_message(void)
case MSG_TURNON:
prepare_turn_on();
break;
+ case MSG_GET_MAXIMA: {
+ reply.id = MSG_MAXIMA;
+ if (rx_msg.getmaxima.island == 0) {
+ reply.maxima.pressure = XY_MAX_PRESSURE;
+ reply.maxima.hysteresis = XY_MAX_HYSTERESIS;
+ send_message(&reply);
+ } else if (rx_msg.getmaxima.island == 1) {
+ reply.maxima.pressure = Z_MAX_PRESSURE;
+ reply.maxima.hysteresis = Z_MAX_HYSTERESIS;
+ send_message(&reply);
+ } else
+ err = MSG_ERR_INVAL;
+ break;
+ }
case MSG_INVALID:
break;
default:
bues.ch cgit interface