From 4e272e25468db5b585fa134fcbc159709531b0da Mon Sep 17 00:00:00 2001 From: Peace Kotamnives Date: Wed, 9 Aug 2023 07:22:54 -0400 Subject: [PATCH] fix cadacy complaint again --- projects/cm_mcu/LocalTasks.c | 9 ++++----- projects/cm_mcu/MonitorI2CTask.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/projects/cm_mcu/LocalTasks.c b/projects/cm_mcu/LocalTasks.c index eaafb000..6ff93eef 100644 --- a/projects/cm_mcu/LocalTasks.c +++ b/projects/cm_mcu/LocalTasks.c @@ -672,25 +672,24 @@ int8_t getFFpresentbit(const uint8_t i) { uint8_t j; int8_t val; - uint8_t bitone = 0x1U; configASSERT(i < NFIREFLIES); if (i < NFIREFLIES_IT_F1) { j = i; - val = ffl12_f1_args.present_bit_mask & (bitone << (uint8_t)j); + val = ffl12_f1_args.present_bit_mask & (0x1U << j); } else if (NFIREFLIES_IT_F1 <= i && i < NFIREFLIES_IT_F1 + NFIREFLIES_DAQ_F1) { j = i - NFIREFLIES_IT_F1; - val = ffl12_f1_args.present_bit_mask & (bitone << (uint8_t)j); + val = ffl12_f1_args.present_bit_mask & (0x1U << j); } else if (NFIREFLIES_F1 <= i && i < NFIREFLIES_F1 + NFIREFLIES_IT_F2) { j = i - NFIREFLIES_F1; - val = ffl12_f1_args.present_bit_mask & (bitone << (uint8_t)j); + val = ffl12_f1_args.present_bit_mask & (0x1U << j); } else { j = i - (NFIREFLIES_F1 + NFIREFLIES_IT_F2); - val = ffl12_f1_args.present_bit_mask & (bitone << (uint8_t)j); + val = ffl12_f1_args.present_bit_mask & (0x1U << j); } return val; diff --git a/projects/cm_mcu/MonitorI2CTask.h b/projects/cm_mcu/MonitorI2CTask.h index 1c757ead..f245d7c6 100644 --- a/projects/cm_mcu/MonitorI2CTask.h +++ b/projects/cm_mcu/MonitorI2CTask.h @@ -42,7 +42,7 @@ struct MonitorI2CTaskArgs_t { TickType_t updateTick; // last update time, in ticks SemaphoreHandle_t xSem; // semaphore for controlling access to device uint8_t ffpart_bit_mask; // this mask is only used for detecting 12-ch 25Gbps on the REV2 board - uint8_t present_bit_mask; // this mask is used for all ffs to detect if it is mounted or not + uint32_t present_bit_mask; // this mask is used for all ffs to detect if it is mounted or not const uint8_t n_rxchs; // the number of optical receiver channels uint16_t *opt_pow_values; // a set of optical power measurements only from FFs with 25Gbs UBaseType_t stack_size; // stack size of task