diff options
Diffstat (limited to 'app.h')
-rw-r--r-- | app.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -7,14 +7,18 @@ #define SENSOR_NAME_LEN 10 +// TODO: Randomize these numbers. There are no reason why they should be in order. + enum sm_cmd_code { SM_CMD_GET_SENSOR_COUNT = 1, - SM_CMD_GET_VALUE = 2, + // Used to be 2 + SM_CMD_GET_VALUE = 8, SM_CMD_SET_WARNING_VALUE = 3, SM_CMD_GET_WARNING_VALUE = 4, SM_CMD_SET_SENSOR_NAME = 5, SM_CMD_GET_SENSOR_NAME = 6, SM_CMD_SET_UPDATE_INTERVAL = 7, + // 8 is used SM_CMD_FAIL = 255, }; @@ -29,7 +33,11 @@ struct sm_get_value_req { uint8_t sensor; }; +/** + * This includes the sensor id because it can be used as a notification too + */ struct sm_get_value_res { + uint8_t sensor; uint16_t value; }; @@ -126,4 +134,3 @@ void write_res(struct sm_res const& res); #endif // vim: set ft=arduino: - |