semin ahn / Mbed OS zeta_stm_kinetic

Dependencies:   BufferedSerial

src/callbackHeader.hpp

Committer:
_seminahn
Date:
2021-04-02
Revision:
0:4ff8aeb3e4d1
Child:
1:2594a70c1ddd

File content as of revision 0:4ff8aeb3e4d1:

#ifndef ZETA_STM_KINETIC_CALLBACKHEADER_H_
#define ZETA_STM_KINETIC_CALLBACKHEADER_H_
#include "rosHeader.hpp"
#include "mbed.h"
#include "myUtil.hpp"

extern zetabot_main::ModuleControlMsgs moduleControlMsg;
extern volatile bool isSubscribe;
extern volatile uint8_t NUC_sub_state;

void ModuleControlCB(const zetabot_main::ModuleControlMsgs& msg) {
    memcpy(moduleControlMsg.module_power,msg.module_power,sizeof(msg.module_power)/sizeof(bool));
    moduleControlMsg.pulifier = msg.pulifier;
    isSubscribe = true;
}

void BluetoothCB(const std_msgs::UInt8& msg) {
    NUC_sub_state = msg.data;
}
#endif