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