|
|
@@ -13,7 +13,9 @@ Format: command + ((slot_id) + data (optional))
|
|
|
*/
|
|
|
//Send command to set charge and discharge current to the target
|
|
|
void controller_SetCurrent(uint8_t const TARGET_ADDRESS, uint8_t slot_id, int16_t current_mA){
|
|
|
-
|
|
|
+
|
|
|
+ uint8_t target_address= TARGET_BASE_ADDRESS + ((slot_id & 0b00000100) >> 2);
|
|
|
+ printf("Target Address 0x%02X \n", target_address);
|
|
|
//Bitmasked: Slot id + Command
|
|
|
uint8_t txBuffer_setCurrent[3];
|
|
|
txBuffer_setCurrent[0]= (slot_id<<4) | (CMD_SET_CURRENT & 0x0F);
|