parent
d19e2f2a9f
commit
7c5940fcc2
|
@ -76,6 +76,7 @@ int CanStreamerState::sendFrame(const IsoTpFrameHeader & header, const uint8_t *
|
|||
int CanStreamerState::receiveFrame(CANRxFrame *rxmsg, uint8_t *buf, int num, can_sysinterval_t timeout) {
|
||||
if (rxmsg == nullptr || rxmsg->DLC < 1)
|
||||
return 0;
|
||||
engine->pauseCANdueToSerial = true;
|
||||
int frameType = (rxmsg->data8[0] >> 4) & 0xf;
|
||||
int numBytesAvailable, frameIdx;
|
||||
uint8_t *srcBuf = rxmsg->data8;
|
||||
|
|
|
@ -120,6 +120,11 @@ public:
|
|||
bool isPwmEnabled = true;
|
||||
|
||||
const char *prevOutputName = nullptr;
|
||||
/**
|
||||
* ELM327 cannot handle both RX and TX at the same time, we have to stay quite once first ISO/TP packet was detected
|
||||
* this is a pretty temporary hack only while we are trying ELM327, long term ISO/TP and rusEFI broadcast should find a way to coexists
|
||||
*/
|
||||
bool pauseCANdueToSerial = false;
|
||||
|
||||
PinRepository pinRepository;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ void CanWrite::PeriodicTask(efitime_t nowNt) {
|
|||
CanCycle cycle(cycleCount);
|
||||
|
||||
//in case we have Verbose Can enabled, we should keep user configured period
|
||||
if (engineConfiguration->enableVerboseCanTx) {
|
||||
if (engineConfiguration->enableVerboseCanTx && !engine->pauseCANdueToSerial) {
|
||||
uint16_t cycleCountsPeriodMs = cycleCount * CAN_CYCLE_PERIOD;
|
||||
if (0 != engineConfiguration->canSleepPeriodMs) {
|
||||
if (cycleCountsPeriodMs % engineConfiguration->canSleepPeriodMs) {
|
||||
|
|
Loading…
Reference in New Issue