bugfix for SCEX

This commit is contained in:
2022-04-09 01:00:42 +02:00
parent 6071e34771
commit 44c8f5f730
4 changed files with 66 additions and 51 deletions

View File

@ -6,7 +6,17 @@
// Definitions for the Solar Cell Experiment
namespace scex {
static constexpr uint8_t CMD_PING = 0x4e;
enum ScexCmds: uint8_t {
PING = 0b00111,
ONE_CELL = 0b00110
};
static constexpr uint8_t IDLE_BIT_0_DEF_STATE = 0;
static constexpr uint8_t IDLE_BIT_1_DEF_STATE = 1;
uint8_t createCmdByte(ScexCmds cmd, bool tempCheck) {
return (IDLE_BIT_0_DEF_STATE << 7) | (IDLE_BIT_1_DEF_STATE << 6) | (cmd << 1) | tempCheck;
}
}