|
|
@@ -32,7 +32,7 @@ void process_bms_message(can_frame_t *frame, int len){
|
|
|
int result = 0;
|
|
|
uint8_t *data = NULL;
|
|
|
int data_len = 0;
|
|
|
- set_log_all(L_debug);
|
|
|
+ // set_log_all(L_debug);
|
|
|
switch(frame->key) {
|
|
|
case CAN_KEY_BMS_SET_POWER:
|
|
|
if (len != sizeof(pwr_cmd_t)){
|
|
|
@@ -198,9 +198,11 @@ void process_bms_message(can_frame_t *frame, int len){
|
|
|
break;
|
|
|
}
|
|
|
case CAN_KEY_SET_LOGGER:
|
|
|
- if (len != 2) {
|
|
|
+ if (len < 1) {
|
|
|
result = 1;
|
|
|
- }else {
|
|
|
+ } else if (len < 2) {
|
|
|
+ set_log_all(frame->data[0]);
|
|
|
+ } else {
|
|
|
set_log_level(frame->data[0], frame->data[1]);
|
|
|
}
|
|
|
protocol_send_ack(frame->head.can_addr, frame->key, result);
|