bugfix
This commit is contained in:
parent
0b187d19b2
commit
4407fe2a84
|
|
@ -155,14 +155,14 @@ static int mk_cam(facilities_t* facilities, uint8_t *cam_oer, uint32_t *cam_len)
|
||||||
// Acceleration Control (encondig failure)
|
// Acceleration Control (encondig failure)
|
||||||
if(shared_message->b_pedal_value != 1683 && shared_message->s_pedal_value != 1683){
|
if(shared_message->b_pedal_value != 1683 && shared_message->s_pedal_value != 1683){
|
||||||
if(shared_message->b_pedal_value)
|
if(shared_message->b_pedal_value)
|
||||||
ac = ac | 0x01;
|
ac = ac | 0x80;
|
||||||
if(shared_message->s_pedal_value)
|
if(shared_message->s_pedal_value)
|
||||||
ac = ac | 0x02;
|
ac = ac | 0x40;
|
||||||
bvc_hf->accelerationControl = calloc(1, sizeof(AccelerationControl_t));
|
bvc_hf->accelerationControl = calloc(1, sizeof(AccelerationControl_t));
|
||||||
bvc_hf->accelerationControl->buf = malloc(sizeof(uint8_t));
|
bvc_hf->accelerationControl->buf = malloc(sizeof(uint8_t));
|
||||||
memcpy(bvc_hf->accelerationControl->buf, &ac, 1);
|
memcpy(bvc_hf->accelerationControl->buf, &ac, 1);
|
||||||
bvc_hf->accelerationControl->size = 1;
|
bvc_hf->accelerationControl->size = 1;
|
||||||
bvc_hf->accelerationControl->bits_unused = 0;
|
bvc_hf->accelerationControl->bits_unused = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue