Ford SENT ETB bench test in NJ #4745

we shall unit test SENT
This commit is contained in:
Andrey 2022-11-07 10:30:30 -05:00
parent be8ba29b42
commit 73e69940ba
2 changed files with 3 additions and 11 deletions

View File

@ -58,11 +58,6 @@
#define MsgGetSig1(msg) (((msg) >> (1 * 4)) & 0xfff) #define MsgGetSig1(msg) (((msg) >> (1 * 4)) & 0xfff)
#define MsgGetCrc(msg) MsgGetNibble(msg, 7) #define MsgGetCrc(msg) MsgGetNibble(msg, 7)
sent_channel::sent_channel() {
state = SENT_STATE_CALIB;
}
void sent_channel::restart(void) void sent_channel::restart(void)
{ {
state = SENT_STATE_CALIB; state = SENT_STATE_CALIB;

View File

@ -36,17 +36,14 @@ struct sent_channel_stat {
}; };
class sent_channel { class sent_channel {
public:
sent_channel();
private: private:
SENT_STATE_enum state = SENT_STATE_CALIB; SENT_STATE_enum state = SENT_STATE_CALIB;
/* Unit interval in timer clocks - adjusted on SYNC */ /* Unit interval in timer clocks - adjusted on SYNC */
uint32_t tickPerUnit; uint32_t tickPerUnit = 0;
uint32_t pulseCounter; uint32_t pulseCounter = 0;
/* pulses skipped in init state while waiting for SYNC */ /* pulses skipped in init state while waiting for SYNC */
uint32_t initStatePulseCounter; uint32_t initStatePulseCounter = 0;
/* fast channel shift register*/ /* fast channel shift register*/
uint32_t rxReg; uint32_t rxReg;