From https://github.com/prometey1982/VolvoTo ... lasher.cpp
Code: Select all
void Flasher::canGoToSleep(unsigned long protocolId, unsigned long flags) {
unsigned long channel1MsgId;
unsigned long channel2MsgId;
_channel1->startPeriodicMsg(
common::CanMessages::goToSleepCanRequest.toPassThruMsg(protocolId, flags),
channel1MsgId, 5);
if (_channel2) {
_channel2->startPeriodicMsg(
common::CanMessages::goToSleepCanRequest.toPassThruMsg(
protocolId, CAN_29BIT_CHANNEL2),
channel2MsgId, 5);
}
std::this_thread::sleep_for(std::chrono::seconds(3));
if (_channel2) {
_channel2->stopPeriodicMsg(channel2MsgId);
}
_channel1->stopPeriodicMsg(channel1MsgId);
}
https://github.com/prometey1982/VolvoTo ... essage.cpp









