can_api
v1.13.50
Published
can_api
Downloads
56
Readme
First Use Need
(Install serialport first and version must be the same with can_api)
npm install --save-dev electron-rebuild
sudo npm install serialport@(version) --unsafe-perm --build-from-source
("rebuild": "electron-rebuild -f -w serialport") in package.json => scripts
create vue.config.js in package
write code in vue.config.js const { IgnorePlugin } = require('webpack')
module.exports = { pluginOptions: { moment: { locales: ['cn'] }, electronBuilder: { // experimentalNativeDepCheck: true, nodeIntegration: true, // List native deps here if they don't work externals: ['serialport'] } } }
in background.js before createView write this code app.allowRendererProcessReuse = false
in background.js createView write this code const win = new BrowserWindow({ width: 1280, height: 720, webPreferences: { nodeIntegration: true, contextIsolation: false } })
npm install
use this code to check is install success import SerialPort from 'serialport'
SerialPort.list().then(function(ports){ console.log(ports) })
Getting Started
(please check node.js and serialport version is same)
- npm install can_api
- Example:
import { pool } from "can_api"
var portList = pool.getPortList();
pool.connectSeriPort(
portList[0]
, function(arr){
//connect
if(arr['connect']){
//receiver all data
pool.setDataListener(function(output){
console.log(output);
});
//get hmi version. No.19~No.118 function like this
pool.getHmiVer(function(output:){
console.log(output);
//觸發斷線
pool.disconnected();
//取消listener
pool.clearDataListener()();
})
}else{
//connect fail
}
}
, function(){
//disconnect
}
);
Tools
- setMaxListeners(n)
設定 event Linstener 數量,預設10個
n:數量
pool.setMaxListeners(20);
- setIsDebug(isDebug)
自動回覆模擬cmd, 預設關閉
isDebug: true:啟動, false:關閉
pool.setIsDebug(true);
- getWalkAssist()
取得 Walk Assist List
[
{
'id': 0
, 'name': 'Inactivated'
}
, {
'id': 1
, 'name': 'Activated'
}
]
var list = pool.getWalkAssist();
- getWritUnit()
取得 Writ Unit List
[
{
'id': 0
, 'name': 'km'
}
, {
'id': 1
, 'name': 'mile'
}
]
var list = pool.getWritUnit();
- clearData()
清除收集數據
pool.clearData();
- setNoShowArr(arr)
設定特殊處理ID列表
arr: ['123', '456', '789']
pool.setNoShowArr(['123', '345']);
- setNoShowFilter(type)
設定特殊處理類別
type: 0:not select, 1:accept, 2:denied
pool.setNoShowFilter(0);
- getSettings()
取得目前設定清單
output: {
autoOpen: autoOpen
, baudRate: baudRate
, dataBits: dataBits
, stopBits: stopBits
, parity: parity
, rtscts: rtscts
, xon: xon
, xoff: xoff
, xany: xany
, lock: lock
, highWaterMark: highWaterMark
}
var settings = pool.getSettings();
- setSettings(arr)
設定port
arr: {
autoOpen: autoOpen
, baudRate: baudRate
, dataBits: dataBits
, stopBits: stopBits
, parity: parity
, rtscts: rtscts
, xon: xon
, xoff: xoff
, xany: xany
, lock: lock
, highWaterMark: highWaterMark
}
pool.setSettings({ autoOpen: autoOpen , baudRate: baudRate , dataBits: dataBits , stopBits: stopBits , parity: parity , rtscts: rtscts , xon: xon , xoff: xoff , xany: xany , lock: lock , highWaterMark: highWaterMark });
- getAllSetList()
取得全部設定列表
output: {
'baudRate': baudRateList
, 'dataBits': dataBitsList
, 'stopBits': stopBitsList
, 'parity': parityList
, 'rtscts': rtsctsList
, 'xon': xonList
, 'xoff': xoffList
, 'xany': xanyList
, 'lock': lockList
, 'highWaterMark': highWaterMarkList
, 'autoOpen': autoOpenList
}
var list = pool.getAllSetList();
- getPortList()
取得目前port清單
output: [
{
path: '/dev/tty.usbmodem1421',
manufacturer: 'Arduino (www.arduino.cc)',
serialNumber: '752303138333518011C1',
pnpId: undefined,
locationId: '14500000',
productId: '0043',
vendorId: '2341'
}
]
var list = pool.getPortList();
- connectSeriPort(port, connectCallBack, disconnectCallBack)
連線指定port
port: {
path: '/dev/tty.usbmodem1421',
manufacturer: 'Arduino (www.arduino.cc)',
serialNumber: '752303138333518011C1',
pnpId: undefined,
locationId: '14500000',
productId: '0043',
vendorId: '2341'
}
connectCallBack: 連線狀態回復
{
"connect": false
}
disconnectCallBack: 斷線狀態回復
pool.connectSeriPort( portList[0] , function(arr){ //connect if(arr['connect']){ }else{ //connect fail } } , function(){ //disconnect } );
- disconnected()
手動出發斷線
pool.disconnected();
- setSizeListener(outCallback, writeCallback)
取得cmd數量
outCallback(size): 取得 receiver cmd 數量
writeCallback(size): 取得 write cmd 數量
pool.setSizeListener( function(size){ console.log(size); }, function(size){ console.log(size); } )
- clearSizeListener()
清除Size Listener
pool.clearSizeListener();
- setDataListener(callback(output))
取得全部 receiver write cmd
output: {
'directionStatus': 0(Read), 1(Write)
, 'time': 取得時間
, 'type': 0(Data), 1(Remote)
, 'format': 0(standard), 1(extend)
, 'id': Send id
, 'length': cmd length
, 'data': cmd data
}
pool.setDataListener( function(output){ console.log(output); } );
- clearDataListener()
清除 data Listener
pool.clearDataListener();
- write(arr)
發送命令
arr:{
"id": "123"
"type": 0(Data), 1(Remote)
"format": 0(standard), 1(extend)
"data": "12 34 56 78"
}
pool.write({ "id": "123" "type": 0(Data), 1(Remote) "format": 0(standard), 1(extend) "data": "12 34 56 78" });
- getHmiVer(callback(output:)) 取得 Hmi version output:: {"status":true,"data":{"fwVer":"01.23","hwVer":"4.AB","brand":"C"}}
- getHmiSerial(callback(output:)) 取得 Hmi Serial output: {"status":true,"data":{"serial":305419896,"serial_hex":"12345678","manu":255,"manu_hex":"ff","date":"2021/12/2"}}
- getDriverVer(callback(output)) 取得 driver version output: {"status":true,"data":{"hw_type":"01","fw_ver":"23.4A","client":"B","model":"C"}}
- getDriverSerial1(callback(output)) 取得 driver serial 1 output: {"status":true,"data":{"serial":"01234567"}}
- getDriverSerial2(callback(output)) 取得 driver serial 2 output: {"status":true,"data":{"serial":"ABCDEFGH"}}
- getDriverProd(callback(output)) 取得 driver prod output: {"status":true,"data":{"manu":90,"manu_hex":"5a","date":"2021/12/02"}}
- getBmsFwVer(callback(output)) 取得 Bms Fw Version output: {"status":true,"data":{"fw_ver":"01.23","debug_serial":"45","client_number":"6","brand":"7"}}
- getBmsHwVer(callback(output)) 取得 Bms Hw Version output: {"status":true,"data":{"hw_ver":"48.49","fw_ver":"50.51","pn":875902519,"pn_16":"34353637"}}
- getBmsProd(callback(output)) 取得 Bms Prod output: {"status":true,"data":{"serial":"30313233","manu":52,"manu_hex":"34","date":"2021-12-2"}}
- getDriverNumberAssist(callback(output)) 取得 driver number of assist output: {"status":true,"data":{"numberOfAssist":3}}
- writeDriverNumberOfAssist(value) 寫入 driver number of assist value: number of assist
- getDriverWheelDiameter(callback(output)) 取得 driver wheel diameter output: {"status":true,"data":{"wheel_diameter":2854}}
- writeDriverWheelDiameter(value) 寫入 driver wheelDiameter value: wheelDiameter
- getDriverSpeed(callback(output)) 取得 driver speed output: {"status":true,"data":{"speed":450}}
- writeDriverSpeed(value) 寫入 driver speed value: speed
- getDriverCurrent(callback(output)) 取得 driver current output: {"status":true,"data":{"input_current":15000,"phase_current":25000}}
- writeDriverCurrent(input, phase) 寫入 driver current input: Input current limit phase: Phase current limit
- getDriverOverVoltage(callback(output)) 取得 driver over voltage output: {"status":true,"data":{"over_voltage":52000,"voltage_recovery":51000}}
- writeDriverOverVoltage(voltage, recovery) 寫入 driver over voltage voltage: DC bus over voltage recovery: Over voltage recovery
- getDriverUnderVoltage(callback(output)) 取得 driver under voltage output: {"status":true,"data":{"over_voltage":42000,"voltage_recovery":43000,"delay_time":1000}}
- writeDriverUnderVoltage(voltage, recovery, delayTime) 寫入 driver under voltage voltage: DC bus under voltage recovery: under voltage recovery delayTime: Under voltage delay time
- getDriverDivisor(callback(output)) 取得 driver divisor output: {"status":true,"data":{"divisor":13330,"holding_time":30806,"switch_time":22291}}
- writeDriverDivisor(divisor, holding_time, switch_time) 寫入 driver divisor divisor: Fade out divisor holding_time: Fade holding time switch_time: Fade out switch time limit
- getDriverOverTemp(callback(output)) 取得 driver over temp output: {"status":true,"data":{"motor_temp":48,"motor_derating_temp":49,"motor_derating_percentage":50,"controller_temp":51,"controller_derating_temp":52,"controller_derating_percentage":53}}
- writeMotorTemp(motor_temp, motor_derating_temp, motor_derating_percentage) 寫入 motor temp motor_temp: Motor over temperature limit motor_derating_temp: Motor derating temperature motor_derating_percentage: Motor derating percentage
- writeControllerTemp(controller_temp, controller_derating_temp, controller_derating_percentage) 寫入 controller temp controller_temp: Controller over temperature limit controller_derating_temp: Controller derating temperature controller_derating_percentage: Controller derating percentage
- getDriverTS(callback(output)) 取得 driver ts output: {"status":true,"data":{"ts_over":2000,"ts_under":800,"ts_offset":400,"ts_effective":3000}}
- getDriverTS2() 取得 driver ts 2 output: {"status":true,"data":{"ts_adc_value":1024,"ts_effective_value":2048,"ts_percentage":48,"ts_radio":96,"ts_rpm":80}}
- writeTSOver(ts_over, ts_under) 寫入 ts over ts_over: TS over limit ts_under: TS under limit
- writeTSOffset(ts_offset, ts_effective, ts_radio) 寫入 ts offset ts_offset: TS offset ts_effective: TS effective range ts_radio: TS ratio
- getDriverTorqueTune(callback(output)) 取得 driver torque tune output: {"status":true,"data":{"tune_pont1":16,"tune_pont2":32,"tune_area0":48,"tune_area1":64,"tune_area2":80}}
- writeTorquePoint(tune_pont1, tune_pont2) 寫入 torque point tune_point1: Torque tune point 1 tune_point2: Torque tune point 2
- writeTorqueArea(tune_area0, tune_area1, tune_area2) 寫入 torque area tune_area0: Torque tune area 0 tune_area1: Torque tune area 1 tune_area2: Torque tune area 2
- getDriverTorqueInputTime(callback(output)) 取得 driver torque input time output: {"status":true,"data":{"delay_time":500}}
- writeTorqueInputTime(delay_time) 寫入 torque input time delay_time: Torque input delay time
- getDriverTorqueModel1(callback(output)) 取得 driver torque mode 1 output: {"status":true,"data":{"point1":17,"point2":33,"radio1":3,"radio2":4,"radio3":5}}
- getDriverTorqueModel2(callback(output)) 取得 driver torque mode 2 output: {"status":true,"data":{"point1":17,"point2":33,"radio1":3,"radio2":4,"radio3":5}}
- getDriverTorqueModel3(callback(output)) 取得 driver torque mode 3 output: {"status":true,"data":{"point1":17,"point2":33,"radio1":3,"radio2":4,"radio3":5}}
- getDriverTorqueModel4(callback(output)) 取得 driver torque mode 4 output: {"status":true,"data":{"point1":17,"point2":33,"radio1":3,"radio2":4,"radio3":5}}
- getDriverTorqueModel5(callback(output)) 取得 driver torque mode 5 output: {"status":true,"data":{"point1":17,"point2":33,"radio1":3,"radio2":4,"radio3":5}}
- writeTorqueModel(choose, point1, point2, radio1, radio2, radio3) 寫入 torque model choose: Basic mode choose point1: Basic mode n point 1 pount2: Basic mode n point 2 radio1: Basic mode n point 3 radio2: Basic mode n point 4 radio3: Basic mode n point 5
- getDriverStatusMotorTemp(callback(output)) 取得 driver status motor temp output: {"status":true,"data":{"actual_motor_temp":-10,"actual_mosfet_temp_u":16,"actual_mosfet_temp_v":32,"actual_mosfet_temp_w":48}}
- getDriverStatusMcuTemp(callback(output)) 取得 driver status mcu temp output: {"status":true,"data":{"actual_mcu_temp":-20}}
- getDriverStatusInputVoltage(callback(output)) 取得 driver status input voltage output: {"status":true,"data":{"actual_controller_input_voltage":48000,"actual_mcu_input_controller":15000,"human_power_output:":48,"crank_rpm":64,"human_torque":16}}
- getDriverStatusRemainingDistance(callback(output)) 取得 driver status remaining distance output: {"status":true,"data":{"remaining_distance":3000,"remaining_time":40000}}
- getDriverStatusMotorTorqueOutput:(callback(output)) 取得 driver status motor torque output: output: "status":true,"data":{"motor_torque_output:":40,"motor_rpm":300,"motor_power_percentage":48,"motor_power_output:":750}}
- getDriverStatusTSValue(callback(output)) 取得 driver status ts value output: {"status":true,"data":{"ts_adc_value":1024,"ts_effective_value":2048,"ts_percentage":48,"ts_radio":96,"ts_rpm":80}}
- getDriverStatusTSHi(callback(output))
取得 driver status ts hi
output: {"status":true,"data":{"ts_hi_point":2048,"ts_low_point":1024}} - getBMSStateOfHealth(callback(output)) 取得 bms state of health output: {"status":true,"data":{"state_of_health":100,"min":36,"hour":15,"day":31,"month":12,"year":2020}}
- getBMSTotalDischargeCapacity(callback(output)) 取得 bms total discharge capacity output: {"status":true,"data":{"total_discharge_capacity":13400,"cycle_count":300,"full_chagrged_capacity":13400}}
- getBMSUnderVoltageLimit(callback(output)) 取得 bms under voltage limit output: {"status":true,"data":{"total_discharge_capacity":13400,"cycle_count":300,"full_chagrged_capacity":13400}}
- getBMSIdleCurrentLimit(callback(output)) 取得 bms idle current limit output: {"status":true,"data":{"idel_current_limit":160,"idel_timeout":1024000}}
- getBMSRestMah(callback(output)) 取得 bms rest mah output: {"status":true,"data":{"rest_mah":100000}}
- getBMSDischargeCurrentCounter(callback(output)) 取得 bms discharge current counter output: {"status":true,"data":{"discharge_current_count":4,"charge_current_count":8,"discharge_temp_count":16,"charge_temp_count":1024}}
- getBMSShortCircuitCounter(callback(output)) 取得 bms short circuit counter output: {"status":true,"data":{"short_curcuit_count":2048,"regeneration_error_count":4096,"over_voltage_count":8192}}
- getBMSMaxDischargeCurrent(callback(output)) 取得 bms max discharge current output: {"status":true,"data":{"max_discharge_current":15000,"max_charge_current":3000,"max_voltage":52000,"max_discharge_temp":-10,"max_charge_temp":40}}
- getBMSCellVoltage1(callback(output)) 取得 bms cell voltage 1-4 output: {"status":true,"data":{"cell_voltage_1":48000,"cell_voltage_2":48001,"cell_voltage_3":48002,"cell_voltage_4":48003}}
- getBMSCellVoltage2(callback(output)) 取得 bms cell voltage 5-8 output: {"status":true,"data":{"cell_voltage_5":48004,"cell_voltage_6":48005,"cell_voltage_7":48006,"cell_voltage_8":48007}}
- getBMSCellVoltage3(callback(output)) 取得 bms cell voltage 9-12 output: {"status":true,"data":{"cell_voltage_9":48008,"cell_voltage_10":48009,"cell_voltage_11":48010,"cell_voltage_12":48011}}
- getBMSCellVoltage4(callback(output)) 取得 bms cell voltage 13 output: {"status":true,"data":{"cell_voltage_13":48012}}
- writeBmsClearError() 寫入 bms clear error
- writeBmsClearMax 寫入 bms clear max
- getMCPeriodicalFrame(callback(output)) 取得 mc periodical frame output: {"status":true,"data":{"speed":6.4,"trip":300,"odo":400,"current_mode_level":4,"lock":"1","brake":"1","light":"1","error":"1","unit_mile":"1","derating":"1","walking":"1"}}
- clearMCPeriodicalFrame() 清除 mac periodical frame listener
- writeMCClearTrip() 寫入 mc clear trip
- writeMCWritUnit(data) 寫入 mc writ unit data: WritUnitList data
- writeMCAssistLevel(level) 寫入 mc assist level level: level 0-8
- writeMCWalkAssist(data) 寫入 mc walk assist data: WalkAssistList data
- getBMSPeriodicalFrame(callback(output)) 取得 bms periodical frame output: {"status":true,"data":{"total_battery_voltage":48000,"charge_discharge_current":-200,"discharge":"1","dcmos_on":"1","have_error":"0","cell_temp":-10,"state_of_charge":100}}
- clearBMSPeriodicalFrame() 清除 bms periodical frame listener
- getBMSEXPeriodicalFrame(callback(output)) 取得 bms-ex periodical frame output: {"status":true,"data":{"total_battery_voltage":48001,"charge_discharge_current":-200.1,"discharge":"0","dcmos_on":"1","have_error":"1","cell_temp":-11,"state_of_charge":99.5}}
- clearBMSEXPeriodicalFrame() 清除 bms-ex periodical frame listener
- getBMSEXVersion(callback(output)) 取得 bms-ex version output: {"status":true,"data":{"main_ver":"01","sec_ver":"23","debug_serial":"45","client_number":"6","brand":"7"}}
- getBMSEXDPVersion(callback(output)) 取得 bms-ex dp version output: {"status":true,"data":{"hw_reversion":48,"hw_version":49,"fw_reversion":50,"fw_version":51,"pn":875902519,"pn_hex":"34353637"}}
- getBMSEXSerialProd(callback(output)) 取得 bms-ex serial prod output: {"status":true,"data":{"serial_number":"30313233","code":52,"code_hex":"34","day":2,"month":12,"year":2021}}
- getBMSEXStateOfHealth(callback(output)) 取得 bms-ex state of health output: {"status":true,"data":{"state_of_health":100,"min":36,"hour":15,"day":31,"month":12,"year":2020}}
- getBMSEXDischargeCapacity(callback(output)) 取得 bms-ex discharge capacity output: {"status":true,"data":{"total_discharge_capacity":13400,"cycle_count":300,"full_chagrged_capacity":13400}}
- getBMSEXUnderVoltage(callback(output)) 取得 bms-ex under voltage output: {"status":true,"data":{"under_voltage_limit":42000,"under_voltage_delay_time":1000,"under_voltage_recovery_limit":43000}}
- getBMSEXIdleCurrent(callback(output)) 取得 bms-ex idle current output: {"status":true,"data":{"idle_current_limit":160,"idle_timeout":1024000}}
- getBMSEXRestMah(callback(output)) 取得 bms-ex rest mah output: {"status":true,"data":{"idle_current_limit":160,"idle_timeout":1024000}}
- getBMSEXDischargeCurrentCounter(callback(output)) 取得 bms-ex discharge current counter output: {"status":true,"data":{"discharge_current_count":4,"charge_current_count":8,"discharge_temp_count":16,"charge_temp_count":1024}}
- getBMSEXShortCircuitCounter(callback(output)) 取得 bms-ex short circuit counter output: {"status":true,"data":{"short_curcuit_count":2048,"regeneration_error_count":4096,"over_voltage_count":8192}}
- getBMSEXMaxDischargeCurrent(callback(output)) 取得 bms-ex max discharge current output: {"status":true,"data":{"max_discharge_current":15000,"max_charge_current":3000,"max_voltage":52000,"max_discharge_temp":-10,"max_charge_temp":40}}
- getBMSEXCellVoltage1(callback(output)) 取得 bms-ex cellVoltage 1-4 output: {"status":true,"data":{"cell_voltage_1":48000,"cell_voltage_2":48001,"cell_voltage_3":48002,"cell_voltage_4":48003}}
- getBMSEXCellVoltage2(callback(output)) 取得 bms-ex cellVoltage 5-8 output: {"status":true,"data":{"cell_voltage_5":48004,"cell_voltage_6":48005,"cell_voltage_7":48006,"cell_voltage_8":48007}}
- getBMSEXCellVoltage3(callback(output)) 取得 bms-ex cellVoltage 9-12 output: {"status":true,"data":{"cell_voltage_9":48008,"cell_voltage_10":48009,"cell_voltage_11":48010,"cell_voltage_12":48011}}
- getBMSEXCellVoltage4(callback(output)) 取得 bms-ex cellVoltage 13 output: {"status":true,"data":{"cell_voltage_13":48012}}
- writeBmsEXClearError() 寫入 bms-ex clear error
- writeBmsEXClearMax() 寫入 bms-ex clear max
- getHmiPeriodicalFrame(callback(output)) 取得 hmi periodical frame output: {"status":true,"data":{"mode":0,"error_status":1}}
- clearHmiPeriodicalFrame() 清除 hmi periodical frame listener
- getBmsWarningAlarm(callback(output)) 取得 bms warning alarm output: {"status":true,"data":[{"dateTime":"2021-12-14 07:23:01","error_code":"UT"},{"dateTime":"2021-12-14 07:23:01","error_code":"OT"},{"dateTime":"2021-12-14 07:23:01","error_code":"OCC"},{"dateTime":"2021-12-14 07:23:01","error_code":"UV"},{"dateTime":"2021-12-14 07:23:01","error_code":"OV"},{"dateTime":"2021-12-14 07:23:01","error_code":"DSC"},{"dateTime":"2021-12-14 07:23:01","error_code":"ODC"},{"dateTime":"2021-12-14 07:23:01","error_code":"COUT"}]}
- clearHmiPeriodicalFrame() 清除 hmi periodical frame listener
- getBmsEXWarningAlarm(callback(output)) 取得 bms-ex warning alarm output: {"status":true,"data":[{"dateTime":"2021-12-14 07:24:33","error_code":"UT"},{"dateTime":"2021-12-14 07:24:33","error_code":"OT"},{"dateTime":"2021-12-14 07:24:33","error_code":"OCC"},{"dateTime":"2021-12-14 07:24:33","error_code":"UV"},{"dateTime":"2021-12-14 07:24:33","error_code":"OV"},{"dateTime":"2021-12-14 07:24:33","error_code":"DSC"},{"dateTime":"2021-12-14 07:24:33","error_code":"ODC"},{"dateTime":"2021-12-14 07:24:33","error_code":"COUT"}]}
- clearBmsEXWarningAlarmListener() 清除 bms-ex warning alarm
- getMcWarningAlarm(callback(output)) 取得 mc warning alarm output: {"status":true,"data":[{"dateTime":"2021-12-14 07:25:40","error_code":"Torque Over Limit"},{"dateTime":"2021-12-14 07:25:40","error_code":"Hall Sensor"},{"dateTime":"2021-12-14 07:25:40","error_code":"Bettery Over Voltage"},{"dateTime":"2021-12-14 07:25:40","error_code":"DRV Over Phase Current"},{"dateTime":"2021-12-14 07:25:40","error_code":"Battery Over Current"},{"dateTime":"2021-12-14 07:25:40","error_code":"Turn On While Drive"},{"dateTime":"2021-12-14 07:25:40","error_code":"Battery Under Voltage"},{"dateTime":"2021-12-14 07:25:40","error_code":"Motor Over Temperature"},{"dateTime":"2021-12-14 07:25:40","error_code":"MOSFET Over Temprature"},{"dateTime":"2021-12-14 07:25:40","error_code":"Throttle Under Limit"},{"dateTime":"2021-12-14 07:25:40","error_code":"Throttle Over Limit"},{"dateTime":"2021-12-14 07:25:40","error_code":"Torque Under Limit"},{"dateTime":"2021-12-14 07:25:40","error_code":"EEPROM Error"},{"dateTime":"2021-12-14 07:25:40","error_code":"Constant Voltage Error"},{"dateTime":"2021-12-14 07:25:40","error_code":"HC Time"},{"dateTime":"2021-12-14 07:25:40","error_code":"Bettery SOC Full"},{"dateTime":"2021-12-14 07:25:40","error_code":"Found BMS"},{"dateTime":"2021-12-14 07:25:40","error_code":"BMS Time Out"},{"dateTime":"2021-12-14 07:25:40","error_code":"Crank Over Speed"},{"dateTime":"2021-12-14 07:25:40","error_code":"Update FW Error"}]}
- clearMcWarningAlarmListener() 清除 mc warning alarm listener
- writeMcShutdown() 寫入 mc shutdown
- writeBmsEnterSpecialMode(type) 寫入 bms enter special mode type: 'SHIP', 'BPIN', 'BPOU'
- writeMcHeadLight(flag, reserved) 寫入 mc head light flag: 0: Inactivated/1: Activated reserved: