From 4407fe2a849bae3432d78a9e06d12bc2514f9b99 Mon Sep 17 00:00:00 2001 From: David Rocha Date: Thu, 20 Jan 2022 16:57:48 +0000 Subject: [PATCH 1/2] bugfix --- src/cam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cam.c b/src/cam.c index 17c05aa..6168af4 100644 --- a/src/cam.c +++ b/src/cam.c @@ -155,14 +155,14 @@ static int mk_cam(facilities_t* facilities, uint8_t *cam_oer, uint32_t *cam_len) // Acceleration Control (encondig failure) if(shared_message->b_pedal_value != 1683 && shared_message->s_pedal_value != 1683){ if(shared_message->b_pedal_value) - ac = ac | 0x01; + ac = ac | 0x80; if(shared_message->s_pedal_value) - ac = ac | 0x02; + ac = ac | 0x40; bvc_hf->accelerationControl = calloc(1, sizeof(AccelerationControl_t)); bvc_hf->accelerationControl->buf = malloc(sizeof(uint8_t)); memcpy(bvc_hf->accelerationControl->buf, &ac, 1); bvc_hf->accelerationControl->size = 1; - bvc_hf->accelerationControl->bits_unused = 0; + bvc_hf->accelerationControl->bits_unused = 1; } } From 10ec3317405106facf49a00b2a4e1879b64db834 Mon Sep 17 00:00:00 2001 From: Emanuel Vieira Date: Fri, 21 Jan 2022 11:20:49 +0000 Subject: [PATCH 2/2] Initialize rv in dissemination_check() --- src/cpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpm.c b/src/cpm.c index dccbcd6..af57638 100644 --- a/src/cpm.c +++ b/src/cpm.c @@ -155,7 +155,7 @@ dissemination_t* dissemination_init(){ int dissemination_check(dissemination_t* dissemination, it2s_tender_epv_t* epv, int f) { - int rv; + int rv = 0; uint64_t now = it2s_tender_get_clock(epv);