updated state machine
This commit is contained in:
parent
9042ceb02c
commit
fc24a34740
@ -1,7 +1,17 @@
|
|||||||
//int errorcode[2] = {0,0}; 1 Bit per error
|
#ifndef INC_STATE_MACHINE_H
|
||||||
|
#define INC_STATE_MACHINE_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "ADBMS_LL_Driver.h"
|
||||||
|
#include "AMS_HighLevel.h"
|
||||||
|
#include "PWM_control.h"
|
||||||
|
#include "stm32f3xx_hal.h"
|
||||||
|
#include "ADBMS_Abstraction.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "can.h"
|
||||||
|
|
||||||
// Minimum vehicle side voltage to exit precharge
|
// Minimum vehicle side voltage to exit precharge
|
||||||
#define MIN_VEHICLE_SIDE_VOLTAGE 150000 // mV
|
#define MIN_VEHICLE_SIDE_VOLTAGE 150000 // mV
|
||||||
// Time to wait after reaching 95% of battery voltage before exiting precharge
|
// Time to wait after reaching 95% of battery voltage before exiting precharge
|
||||||
@ -16,19 +26,19 @@
|
|||||||
// Time to wait between closing relays
|
// Time to wait between closing relays
|
||||||
#define RELAY_CLOSE_WAIT 10 // ms
|
#define RELAY_CLOSE_WAIT 10 // ms
|
||||||
|
|
||||||
typedef enum { // 7 states -> 3 bit. valid transitions: (all could transition to error)
|
typedef enum { // states -> 3 bit. valid transitions: (all could transition to error)
|
||||||
STATE_INACTIVE, // INACTIVE -> PRECHARGE, CHARGING, ERROR
|
STATE_INACTIVE, // INACTIVE -> PRECHARGE, CHARGING, ERROR
|
||||||
STATE_PRECHARGE, // PRECHARGE -> INACTIVE, READY, DISCHARGE, ERROR
|
STATE_PRECHARGE, // PRECHARGE -> INACTIVE, READY, DISCHARGE, ERROR
|
||||||
STATE_READY, // READY -> ACTIVE, DISCHARGE, ERROR
|
STATE_READY, // READY -> ACTIVE, DISCHARGE, ERROR
|
||||||
STATE_ACTIVE, // ACTIVE -> READY, DISCHARGE, ERROR
|
STATE_ACTIVE, // ACTIVE -> READY, DISCHARGE, ERROR
|
||||||
STATE_DISCHARGE, // DISCHARGE -> INACTIVE, PRECHARGE, ERROR
|
STATE_DISCHARGE, // DISCHARGE -> INACTIVE, PRECHARGE, ERROR
|
||||||
|
STATE_CHARGING_PRECHARGE,
|
||||||
STATE_CHARGING, // CHARGING -> INACTIVE, DISCHARGE, ERROR
|
STATE_CHARGING, // CHARGING -> INACTIVE, DISCHARGE, ERROR
|
||||||
STATE_ERROR, // ERROR -> INACTIVE, DISCHARGE, ERROR
|
STATE_ERROR, // ERROR -> INACTIVE, DISCHARGE, ERROR
|
||||||
} State;
|
} State;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t bms_timeout : 1;
|
uint16_t bms_timeout : 1;
|
||||||
uint16_t bms_checksum_fail : 1;
|
|
||||||
uint16_t bms_overtemp : 1;
|
uint16_t bms_overtemp : 1;
|
||||||
uint16_t bms_fault : 1;
|
uint16_t bms_fault : 1;
|
||||||
|
|
||||||
@ -39,9 +49,9 @@ typedef struct {
|
|||||||
uint16_t temperature_sensor_missing : 1;
|
uint16_t temperature_sensor_missing : 1;
|
||||||
uint16_t current_sensor_missing : 1;
|
uint16_t current_sensor_missing : 1;
|
||||||
uint16_t voltage_missing : 1;
|
uint16_t voltage_missing : 1;
|
||||||
|
uint16_t battery_missing : 1;
|
||||||
uint16_t relay_missing : 1;
|
uint16_t relay_missing : 1;
|
||||||
|
|
||||||
uint16_t state_fail : 1;
|
|
||||||
uint16_t state_transition_fail : 1;
|
uint16_t state_transition_fail : 1;
|
||||||
} ErrorKind;
|
} ErrorKind;
|
||||||
|
|
||||||
@ -64,16 +74,17 @@ State sm_update_precharge();
|
|||||||
State sm_update_ready();
|
State sm_update_ready();
|
||||||
State sm_update_active();
|
State sm_update_active();
|
||||||
State sm_update_discharge();
|
State sm_update_discharge();
|
||||||
|
State sm_update_charging_precharge();
|
||||||
State sm_update_charging();
|
State sm_update_charging();
|
||||||
State sm_update_error();
|
State sm_update_error();
|
||||||
|
|
||||||
typedef enum { RELAY_MAIN, RELAY_PRECHARGE } Relay;
|
typedef enum { RELAY_MAIN, RELAY_PRECHARGE } Relay;
|
||||||
void sm_set_relay_positions(State state);
|
void sm_set_relay_positions(State state);
|
||||||
void sm_set_relay(Relay relay, bool closed);
|
void sm_set_relay(Relay relay, bool closed);
|
||||||
void sm_check_precharge_discharge(bool *is_closed, bool should_close);
|
void sm_charging_check();
|
||||||
|
|
||||||
|
void sm_handle_ams_in();
|
||||||
void sm_check_errors();
|
void sm_check_errors();
|
||||||
|
|
||||||
void sm_handle_ams_in(const uint8_t *data);
|
|
||||||
|
|
||||||
void sm_set_error(ErrorKind error_kind, bool is_errored);
|
void sm_set_error(ErrorKind error_kind, bool is_errored);
|
||||||
|
|
||||||
|
#endif /* "INC_STATE_MACHINE_H" */
|
@ -24,5 +24,5 @@ void can_handle_send_status() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void can_handle_recieve_command(const uint8_t *data){
|
void can_handle_recieve_command(const uint8_t *data){
|
||||||
ftcan_msg_received_cb(0x501, 8, data);
|
ftcan_msg_received_cb(0x501, 16, data);
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,24 @@
|
|||||||
#include "state_machine.h"
|
#include "state_machine.h"
|
||||||
#include "ADBMS_LL_Driver.h"
|
|
||||||
#include "AMS_HighLevel.h"
|
|
||||||
#include "stm32f3xx_hal.h"
|
|
||||||
#include "ADBMS_Abstraction.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
StateHandle state;
|
StateHandle state;
|
||||||
static bool relay_closed = 0;
|
static bool relay_closed = 0;
|
||||||
static bool precharge_closed = 0;
|
static bool precharge_closed = 0;
|
||||||
static int16_t RELAY_BAT_SIDE = 0;
|
static int16_t RELAY_BAT_SIDE_VOLTAGE = 0;
|
||||||
static int16_t RELAY_ESC_SIDE = 0;
|
static int16_t RELAY_ESC_SIDE_VOLTAGE = 0;
|
||||||
static int16_t CURRENT_MEASUREMENT = 0;
|
static int16_t CURRENT_MEASUREMENT_VOLTAGE = 0;
|
||||||
|
static int16_t timestamp;
|
||||||
|
|
||||||
void sm_init(){
|
void sm_init(){
|
||||||
state.current_state = STATE_INACTIVE;
|
state.current_state = STATE_INACTIVE;
|
||||||
state.target_state = STATE_INACTIVE;
|
state.target_state = STATE_INACTIVE;
|
||||||
state.error_source = 0;
|
state.error_source = 0;
|
||||||
|
RELAY_BAT_SIDE_VOLTAGE = module.auxVoltages[0];
|
||||||
|
RELAY_ESC_SIDE_VOLTAGE = module.auxVoltages[1];
|
||||||
|
CURRENT_MEASUREMENT_VOLTAGE = module.auxVoltages[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
void sm_update(){
|
void sm_update(){
|
||||||
|
sm_handle_ams_in();
|
||||||
switch (state.current_state) {
|
switch (state.current_state) {
|
||||||
case STATE_INACTIVE:
|
case STATE_INACTIVE:
|
||||||
state.current_state = sm_update_inactive(); // monitor only
|
state.current_state = sm_update_inactive(); // monitor only
|
||||||
@ -36,6 +35,9 @@ void sm_update(){
|
|||||||
case STATE_DISCHARGE:
|
case STATE_DISCHARGE:
|
||||||
state.current_state = sm_update_discharge(); // open the main relay, keep PRECHARGE closed
|
state.current_state = sm_update_discharge(); // open the main relay, keep PRECHARGE closed
|
||||||
break;
|
break;
|
||||||
|
case STATE_CHARGING_PRECHARGE:
|
||||||
|
state.current_state = sm_update_charging_precharge();
|
||||||
|
break;
|
||||||
case STATE_CHARGING:
|
case STATE_CHARGING:
|
||||||
state.current_state = sm_update_charging(); // monitor and turn on cooling if needed.
|
state.current_state = sm_update_charging(); // monitor and turn on cooling if needed.
|
||||||
break;
|
break;
|
||||||
@ -45,17 +47,14 @@ void sm_update(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
sm_set_relay_positions(state.current_state);
|
sm_set_relay_positions(state.current_state);
|
||||||
//status_led_state(state.current_state, (ErrorKind) state.error_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
State sm_update_inactive(){
|
State sm_update_inactive(){
|
||||||
switch (state.target_state) {
|
switch (state.target_state) {
|
||||||
case STATE_PRECHARGE:
|
case STATE_PRECHARGE:
|
||||||
//close precharge relay, wait until both sides are similar
|
|
||||||
sm_set_relay_positions(STATE_PRECHARGE);
|
|
||||||
return STATE_PRECHARGE;
|
return STATE_PRECHARGE;
|
||||||
case STATE_CHARGING:
|
case STATE_CHARGING_PRECHARGE:
|
||||||
return STATE_CHARGING;
|
return STATE_CHARGING_PRECHARGE;
|
||||||
default:
|
default:
|
||||||
return STATE_INACTIVE;
|
return STATE_INACTIVE;
|
||||||
}
|
}
|
||||||
@ -63,12 +62,11 @@ State sm_update_inactive(){
|
|||||||
|
|
||||||
State sm_update_precharge(){
|
State sm_update_precharge(){
|
||||||
switch (state.target_state) {
|
switch (state.target_state) {
|
||||||
case STATE_INACTIVE:
|
case STATE_INACTIVE: // if CAN Signal 0000 0000 then immidiete shutdown
|
||||||
return STATE_INACTIVE;
|
|
||||||
case STATE_READY:
|
|
||||||
return STATE_READY;
|
|
||||||
case STATE_DISCHARGE:
|
|
||||||
return STATE_DISCHARGE;
|
return STATE_DISCHARGE;
|
||||||
|
case STATE_READY:
|
||||||
|
if (RELAY_BAT_SIDE_VOLTAGE == RELAY_ESC_SIDE_VOLTAGE)
|
||||||
|
return STATE_READY;
|
||||||
default:
|
default:
|
||||||
return STATE_PRECHARGE;
|
return STATE_PRECHARGE;
|
||||||
}
|
}
|
||||||
@ -76,9 +74,9 @@ State sm_update_precharge(){
|
|||||||
|
|
||||||
State sm_update_ready(){
|
State sm_update_ready(){
|
||||||
switch (state.target_state) {
|
switch (state.target_state) {
|
||||||
case STATE_ACTIVE:
|
case STATE_ACTIVE: // if CAN Signal 1100 0000 then turn on powerground
|
||||||
return STATE_ACTIVE;
|
return STATE_ACTIVE;
|
||||||
case STATE_DISCHARGE:
|
case STATE_DISCHARGE: // if CAN Signal 0000 0000 then shutdown
|
||||||
return STATE_DISCHARGE;
|
return STATE_DISCHARGE;
|
||||||
default:
|
default:
|
||||||
return STATE_READY;
|
return STATE_READY;
|
||||||
@ -87,9 +85,9 @@ State sm_update_ready(){
|
|||||||
|
|
||||||
State sm_update_active(){
|
State sm_update_active(){
|
||||||
switch (state.target_state) {
|
switch (state.target_state) {
|
||||||
case STATE_READY:
|
case STATE_READY: // if CAN Signal 1000 0000 then turn oof powerground but stay ready
|
||||||
return STATE_READY;
|
return STATE_READY;
|
||||||
case STATE_DISCHARGE:
|
case STATE_DISCHARGE: // if CAN Signal 0000 0000 then shutdown
|
||||||
return STATE_DISCHARGE;
|
return STATE_DISCHARGE;
|
||||||
default:
|
default:
|
||||||
return STATE_ACTIVE;
|
return STATE_ACTIVE;
|
||||||
@ -99,18 +97,28 @@ State sm_update_active(){
|
|||||||
State sm_update_discharge(){
|
State sm_update_discharge(){
|
||||||
switch (state.target_state) {
|
switch (state.target_state) {
|
||||||
case STATE_INACTIVE:
|
case STATE_INACTIVE:
|
||||||
|
if (RELAY_ESC_SIDE_VOLTAGE == 0)
|
||||||
return STATE_INACTIVE;
|
return STATE_INACTIVE;
|
||||||
case STATE_PRECHARGE:
|
case STATE_PRECHARGE: // if CAN Signal 1000 0000 then get ready
|
||||||
return STATE_PRECHARGE;
|
return STATE_PRECHARGE;
|
||||||
default:
|
default:
|
||||||
return STATE_DISCHARGE;
|
return STATE_DISCHARGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
State sm_update_charging_precharge(){
|
||||||
|
switch (state.target_state) {
|
||||||
|
case STATE_CHARGING:
|
||||||
|
return STATE_CHARGING;
|
||||||
|
case STATE_DISCHARGE:
|
||||||
|
return STATE_DISCHARGE;
|
||||||
|
default:
|
||||||
|
return STATE_CHARGING_PRECHARGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
State sm_update_charging(){
|
State sm_update_charging(){
|
||||||
switch (state.target_state) {
|
switch (state.target_state) {
|
||||||
case STATE_INACTIVE:
|
|
||||||
return STATE_INACTIVE;
|
|
||||||
case STATE_DISCHARGE:
|
case STATE_DISCHARGE:
|
||||||
return STATE_DISCHARGE;
|
return STATE_DISCHARGE;
|
||||||
default:
|
default:
|
||||||
@ -118,10 +126,9 @@ State sm_update_charging(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
State sm_update_error(){
|
State sm_update_error(){
|
||||||
switch (state.target_state) {
|
switch (state.target_state) {
|
||||||
case STATE_INACTIVE:
|
|
||||||
return STATE_INACTIVE;
|
|
||||||
case STATE_DISCHARGE:
|
case STATE_DISCHARGE:
|
||||||
return STATE_DISCHARGE;
|
return STATE_DISCHARGE;
|
||||||
default:
|
default:
|
||||||
@ -148,7 +155,7 @@ void sm_set_relay_positions(State current_state){
|
|||||||
sm_set_relay(RELAY_PRECHARGE, 0);
|
sm_set_relay(RELAY_PRECHARGE, 0);
|
||||||
case STATE_DISCHARGE:
|
case STATE_DISCHARGE:
|
||||||
sm_set_relay(RELAY_MAIN, 0);
|
sm_set_relay(RELAY_MAIN, 0);
|
||||||
sm_set_relay(RELAY_PRECHARGE, 1);
|
sm_set_relay(RELAY_PRECHARGE, 0);
|
||||||
break;
|
break;
|
||||||
case STATE_CHARGING:
|
case STATE_CHARGING:
|
||||||
sm_set_relay(RELAY_MAIN, 1);
|
sm_set_relay(RELAY_MAIN, 1);
|
||||||
@ -156,6 +163,7 @@ void sm_set_relay_positions(State current_state){
|
|||||||
break;
|
break;
|
||||||
case STATE_ERROR:
|
case STATE_ERROR:
|
||||||
sm_set_relay(RELAY_MAIN, 0);
|
sm_set_relay(RELAY_MAIN, 0);
|
||||||
|
sm_set_relay(RELAY_PRECHARGE, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,14 +182,46 @@ void sm_set_relay(Relay relay, bool closed){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sm_handle_ams_in(){
|
||||||
|
uint8_t data[2] = {};
|
||||||
|
can_handle_recieve_command(&data);
|
||||||
|
switch (data[0]) {
|
||||||
|
case 0b00000000:
|
||||||
|
if (state.current_state != STATE_INACTIVE){
|
||||||
|
PWM_powerground_control(0);
|
||||||
|
state.target_state = STATE_DISCHARGE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0b10000000:
|
||||||
|
if (state.target_state == STATE_INACTIVE || state.target_state == STATE_DISCHARGE){
|
||||||
|
PWM_powerground_control(0);
|
||||||
|
state.target_state = STATE_PRECHARGE;
|
||||||
|
} else if (state.target_state == STATE_ACTIVE){
|
||||||
|
PWM_powerground_control(0);
|
||||||
|
state.target_state = STATE_READY;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0b11000000:
|
||||||
|
PWM_powerground_control(data[1]);
|
||||||
|
state.target_state = STATE_ACTIVE; // READY -> ACTIVE
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sm_check_precharge_discharge(bool *is_closed, bool should_close){}
|
void sm_set_error(ErrorKind error_kind, bool is_errored){}
|
||||||
// compare RELAY_BATT_SIDE and RELAY_ESC_SIDE
|
|
||||||
// if (state.current_state == STATE_PRECHARGE && (RELAY_ESC_SIDE < RELAY_BAT_SIDE)) //-> don't switch from PRECHARGE to READY
|
|
||||||
// if (state.current_state == STATE_DISCHARGE && (RELAY_ESC_SIDE > 12V)) -> don't switch from DISCHARGE to INACTIVE
|
|
||||||
|
|
||||||
void sm_handle_ams_in(const uint8_t *data){}
|
void sm_check_errors(){
|
||||||
|
if (module.status.THSD == 1) {
|
||||||
|
state.error_type.bms_overtemp = 1;
|
||||||
|
}
|
||||||
|
if (RELAY_BAT_SIDE_VOLTAGE < 40){
|
||||||
|
state.error_source = (1 << 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sm_set_error(ErrorKind error_kind, bool is_errored);
|
void sm_charging_check(){
|
||||||
|
if (RELAY_BAT_SIDE_VOLTAGE < RELAY_ESC_SIDE_VOLTAGE && timestamp == 0)
|
||||||
void sm_check_errors(){}
|
timestamp = HAL_GetTick() + 5000;
|
||||||
|
if (timestamp < HAL_GetTick())
|
||||||
|
state.target_state = STATE_CHARGING_PRECHARGE;
|
||||||
|
}
|
@ -1,15 +1,15 @@
|
|||||||
<mxfile host="app.diagrams.net" modified="2024-05-26T18:55:39.454Z" agent="Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" etag="H_Ak985DBUojlxFxS4TJ" version="24.4.8" type="device">
|
<mxfile host="app.diagrams.net" modified="2024-05-26T20:29:49.256Z" agent="Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" etag="129cpu7azo9v42CLPjC2" version="24.4.8" type="device">
|
||||||
<diagram name="Page-1" id="1QHtqUjNJOinxrO5YjKP">
|
<diagram name="Page-1" id="1QHtqUjNJOinxrO5YjKP">
|
||||||
<mxGraphModel dx="1235" dy="713" grid="1" gridSize="10" guides="0" tooltips="1" connect="0" arrows="0" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
<mxGraphModel dx="1500" dy="866" grid="1" gridSize="10" guides="0" tooltips="1" connect="0" arrows="0" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
<root>
|
<root>
|
||||||
<mxCell id="0" />
|
<mxCell id="0" />
|
||||||
<mxCell id="1" parent="0" />
|
<mxCell id="1" parent="0" />
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-36" value="" style="whiteSpace=wrap;html=1;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;glass=0;rounded=0;fillColor=default;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-36" value="" style="whiteSpace=wrap;html=1;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;glass=0;rounded=0;fillColor=default;" vertex="1" parent="1">
|
||||||
<mxGeometry x="80" width="680" height="720" as="geometry" />
|
<mxGeometry x="80" y="5.684341886080802e-14" width="680" height="720" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-2" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-1" target="Uq7C48yd8U4UPNIid9w1-3">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-2" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-1" target="Uq7C48yd8U4UPNIid9w1-3">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<mxPoint x="420" y="390" as="targetPoint" />
|
<mxPoint x="420" y="420.00000000000006" as="targetPoint" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-20" value="CAN Signal: 1000 0000" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-2">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-20" value="CAN Signal: 1000 0000" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-2">
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-1" target="Uq7C48yd8U4UPNIid9w1-12">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-1" target="Uq7C48yd8U4UPNIid9w1-12">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="620" y="70" />
|
<mxPoint x="620" y="100.00000000000001" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@ -30,14 +30,14 @@
|
|||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-1" value="INACTIVE" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-1" value="INACTIVE" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
<mxGeometry x="560" y="160" width="120" height="60" as="geometry" />
|
<mxGeometry x="560" y="189.99999999999997" width="120" height="60" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-4" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-3" target="Uq7C48yd8U4UPNIid9w1-5">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-4" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-3" target="Uq7C48yd8U4UPNIid9w1-5">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<mxPoint x="240" y="350" as="targetPoint" />
|
<mxPoint x="240" y="380.00000000000006" as="targetPoint" />
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="430" y="370" />
|
<mxPoint x="430" y="400.00000000000006" />
|
||||||
<mxPoint x="430" y="370" />
|
<mxPoint x="430" y="400.00000000000006" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-3" target="Uq7C48yd8U4UPNIid9w1-6">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-3" target="Uq7C48yd8U4UPNIid9w1-6">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="620" y="490" />
|
<mxPoint x="620" y="520" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@ -59,13 +59,13 @@
|
|||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-3" value="PRECHARGE" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-3" value="PRECHARGE" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
<mxGeometry x="560" y="320" width="120" height="60" as="geometry" />
|
<mxGeometry x="560" y="350.00000000000006" width="120" height="60" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-5" target="Uq7C48yd8U4UPNIid9w1-3">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-5" target="Uq7C48yd8U4UPNIid9w1-3">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="420" y="350" />
|
<mxPoint x="420" y="380.00000000000006" />
|
||||||
<mxPoint x="420" y="350" />
|
<mxPoint x="420" y="380.00000000000006" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@ -76,21 +76,20 @@
|
|||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-31" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" target="Uq7C48yd8U4UPNIid9w1-1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-31" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" target="Uq7C48yd8U4UPNIid9w1-1">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<mxPoint x="280" y="330" as="sourcePoint" />
|
<mxPoint x="280" y="360.00000000000006" as="sourcePoint" />
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="280" y="330" />
|
<mxPoint x="400" y="360.00000000000006" />
|
||||||
<mxPoint x="420" y="330" />
|
<mxPoint x="400" y="219.99999999999997" />
|
||||||
<mxPoint x="420" y="190" />
|
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-32" value="RELAY_ESC_SIDE == 0
" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-31">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-32" value="RELAY_ESC_SIDE == 0
" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-31">
|
||||||
<mxGeometry x="-0.0317" y="3" relative="1" as="geometry">
|
<mxGeometry x="-0.0317" y="3" relative="1" as="geometry">
|
||||||
<mxPoint x="73" y="-87" as="offset" />
|
<mxPoint x="83" y="-37" as="offset" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-5" value="DISCHARGE" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-5" value="DISCHARGE" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
<mxGeometry x="160" y="320" width="120" height="60" as="geometry" />
|
<mxGeometry x="160" y="350.00000000000006" width="120" height="60" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-8" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-6" target="Uq7C48yd8U4UPNIid9w1-5">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-8" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-6" target="Uq7C48yd8U4UPNIid9w1-5">
|
||||||
<mxGeometry relative="1" as="geometry" />
|
<mxGeometry relative="1" as="geometry" />
|
||||||
@ -98,8 +97,8 @@
|
|||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-6" target="Uq7C48yd8U4UPNIid9w1-9">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-6" target="Uq7C48yd8U4UPNIid9w1-9">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="440" y="570" />
|
<mxPoint x="440" y="600" />
|
||||||
<mxPoint x="440" y="570" />
|
<mxPoint x="440" y="600" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@ -109,10 +108,17 @@
|
|||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-6" value="READY" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-6" value="READY" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||||
<mxGeometry x="360" y="460" width="120" height="60" as="geometry" />
|
<mxGeometry x="360" y="490.00000000000006" width="120" height="60" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-11" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-9" target="Uq7C48yd8U4UPNIid9w1-5">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-11" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-9" target="Uq7C48yd8U4UPNIid9w1-5">
|
||||||
<mxGeometry relative="1" as="geometry" />
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="340" y="660" as="sourcePoint" />
|
||||||
|
<mxPoint x="160" y="390" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="140" y="660" />
|
||||||
|
<mxPoint x="140" y="390" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-28" value="CAN Signal: 0000 0000 OR
Battery out of charge
" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-11">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-28" value="CAN Signal: 0000 0000 OR
Battery out of charge
" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-11">
|
||||||
<mxGeometry x="-0.6115" relative="1" as="geometry">
|
<mxGeometry x="-0.6115" relative="1" as="geometry">
|
||||||
@ -122,8 +128,8 @@
|
|||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-18" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-9" target="Uq7C48yd8U4UPNIid9w1-6">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-18" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-9" target="Uq7C48yd8U4UPNIid9w1-6">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="400" y="570" />
|
<mxPoint x="400" y="600" />
|
||||||
<mxPoint x="400" y="570" />
|
<mxPoint x="400" y="600" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@ -133,7 +139,7 @@
|
|||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-9" value="ACTIVE" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-9" value="ACTIVE" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||||
<mxGeometry x="360" y="600" width="120" height="60" as="geometry" />
|
<mxGeometry x="360" y="630" width="120" height="60" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-12" target="Uq7C48yd8U4UPNIid9w1-14">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-12" target="Uq7C48yd8U4UPNIid9w1-14">
|
||||||
<mxGeometry relative="1" as="geometry" />
|
<mxGeometry relative="1" as="geometry" />
|
||||||
@ -143,12 +149,12 @@
|
|||||||
<mxPoint x="69" y="-22" as="offset" />
|
<mxPoint x="69" y="-22" as="offset" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-12" value="<div>CHARGING</div><div>PRECHAGE</div>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-12" value="CHARGING
PRECHAGE" style="rounded=1;whiteSpace=wrap;" vertex="1" parent="1">
|
||||||
<mxGeometry x="360" y="40" width="120" height="60" as="geometry" />
|
<mxGeometry x="360" y="70" width="120" height="60" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-16" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-14" target="Uq7C48yd8U4UPNIid9w1-5">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-16" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-14" target="Uq7C48yd8U4UPNIid9w1-5">
|
||||||
<mxGeometry relative="1" as="geometry">
|
<mxGeometry relative="1" as="geometry">
|
||||||
<mxPoint x="40" y="350" as="targetPoint" />
|
<mxPoint x="40" y="380.00000000000006" as="targetPoint" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-24" value="CHARGING is done" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-16">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-24" value="CHARGING is done" style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-16">
|
||||||
@ -157,13 +163,29 @@
|
|||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-14" value="CHARGING" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-14" value="CHARGING" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
<mxGeometry x="160" y="160" width="120" height="60" as="geometry" />
|
<mxGeometry x="160" y="189.99999999999997" width="120" height="60" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="Uq7C48yd8U4UPNIid9w1-30" value="CAN_Signal: 0000 0000 " style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="1">
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-30" value="CAN_Signal: 0000 0000 " style="edgeLabel;align=center;verticalAlign=middle;resizable=0;points=[];rounded=1;" vertex="1" connectable="0" parent="1">
|
||||||
<mxGeometry x="280" y="490" as="geometry">
|
<mxGeometry x="280" y="520" as="geometry">
|
||||||
<mxPoint x="12" y="11" as="offset" />
|
<mxPoint x="12" y="11" as="offset" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-46" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.503;exitY=-0.006;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="Uq7C48yd8U4UPNIid9w1-12" target="Uq7C48yd8U4UPNIid9w1-5">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="420" y="59.99" as="sourcePoint" />
|
||||||
|
<mxPoint x="200" y="350.00000000000006" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="420" y="40" />
|
||||||
|
<mxPoint x="120" y="40" />
|
||||||
|
<mxPoint x="120" y="370" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Uq7C48yd8U4UPNIid9w1-48" value="PRECHARGE failure" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="Uq7C48yd8U4UPNIid9w1-46">
|
||||||
|
<mxGeometry x="0.2339" y="-1" relative="1" as="geometry">
|
||||||
|
<mxPoint x="61" y="-91" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
</root>
|
</root>
|
||||||
</mxGraphModel>
|
</mxGraphModel>
|
||||||
</diagram>
|
</diagram>
|
||||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 36 KiB |
Loading…
x
Reference in New Issue
Block a user