self test wip
This commit is contained in:
parent
bbb50e4b4f
commit
ebdc492ed1
@ -21,6 +21,7 @@ void IMTQHandler::doStartUp(){
|
|||||||
if(mode == _MODE_START_UP){
|
if(mode == _MODE_START_UP){
|
||||||
//TODO: Set to MODE_ON again
|
//TODO: Set to MODE_ON again
|
||||||
setMode(MODE_NORMAL);
|
setMode(MODE_NORMAL);
|
||||||
|
communicationStep = CommunicationStep::SELT_TEST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,6 +32,10 @@ void IMTQHandler::doShutDown(){
|
|||||||
ReturnValue_t IMTQHandler::buildNormalDeviceCommand(
|
ReturnValue_t IMTQHandler::buildNormalDeviceCommand(
|
||||||
DeviceCommandId_t * id) {
|
DeviceCommandId_t * id) {
|
||||||
switch (communicationStep) {
|
switch (communicationStep) {
|
||||||
|
case CommunicationStep::SELF_TEST:
|
||||||
|
*id = IMTQ::SELF_TEST;
|
||||||
|
communicationStep = CommunicationStep::GET_ENG_HK_DATA;
|
||||||
|
break;
|
||||||
case CommunicationStep::GET_ENG_HK_DATA:
|
case CommunicationStep::GET_ENG_HK_DATA:
|
||||||
*id = IMTQ::GET_ENG_HK_DATA;
|
*id = IMTQ::GET_ENG_HK_DATA;
|
||||||
communicationStep = CommunicationStep::START_MTM_MEASUREMENT;
|
communicationStep = CommunicationStep::START_MTM_MEASUREMENT;
|
||||||
|
@ -58,6 +58,7 @@ private:
|
|||||||
uint8_t commandBuffer[IMTQ::MAX_COMMAND_SIZE];
|
uint8_t commandBuffer[IMTQ::MAX_COMMAND_SIZE];
|
||||||
|
|
||||||
enum class CommunicationStep {
|
enum class CommunicationStep {
|
||||||
|
SELF_TEST,
|
||||||
GET_ENG_HK_DATA,
|
GET_ENG_HK_DATA,
|
||||||
START_MTM_MEASUREMENT,
|
START_MTM_MEASUREMENT,
|
||||||
GET_CAL_MTM_MEASUREMENT,
|
GET_CAL_MTM_MEASUREMENT,
|
||||||
|
@ -13,6 +13,7 @@ namespace IMTQ {
|
|||||||
static const DeviceCommandId_t GET_CAL_MTM_MEASUREMENT = 0x5;
|
static const DeviceCommandId_t GET_CAL_MTM_MEASUREMENT = 0x5;
|
||||||
/** Requests the raw values measured by the built-in MTM XEN1210 */
|
/** Requests the raw values measured by the built-in MTM XEN1210 */
|
||||||
static const DeviceCommandId_t GET_RAW_MTM_MEASUREMENT = 0x6;
|
static const DeviceCommandId_t GET_RAW_MTM_MEASUREMENT = 0x6;
|
||||||
|
static const DeviceCommandId_t SELF_TEST = 0x7;
|
||||||
|
|
||||||
static const uint8_t GET_TEMP_REPLY_SIZE = 2;
|
static const uint8_t GET_TEMP_REPLY_SIZE = 2;
|
||||||
static const uint8_t CFGR_CMD_SIZE = 3;
|
static const uint8_t CFGR_CMD_SIZE = 3;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user