Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
aa568b9
added init state files
KelmLelm Jun 6, 2025
094a79d
drive state
mattiaswong6 Jun 8, 2025
10739a8
builds find
Lucien950 Jun 9, 2025
f55178a
Merge branch 'master' into quintuna/bms/statemachine
Lucien950 Jun 9, 2025
0f91f5d
beginner
Lucien950 Jun 9, 2025
161fc8c
more basic state machine tests
Lucien950 Jun 9, 2025
ae9af94
more precharge tests
Lucien950 Jun 9, 2025
d188f27
cleanup
Lucien950 Jun 9, 2025
a02c50e
pwm reorg
Lucien950 Jun 10, 2025
be712e4
drafts
Lucien950 Jun 10, 2025
c88ab3e
better builds
Lucien950 Jun 10, 2025
c83b32f
more merge conflicts
KelmLelm Jun 10, 2025
e99075c
merge conflicts galore
KelmLelm Jun 10, 2025
bd15a6d
got rid of .h file for precharge latchh
KelmLelm Jun 10, 2025
3273bab
better build errors
Lucien950 Jun 10, 2025
c78331d
only balance state
Lucien950 Jun 10, 2025
25ba3b7
changed some behaviour for precharge fail
KelmLelm Jun 10, 2025
d2892fc
removed precharge_ok variable from fault state
KelmLelm Jun 10, 2025
b091b88
merge conflicts
KelmLelm Jun 10, 2025
c071de8
more test
Lucien950 Jun 11, 2025
39f84dd
more tests
Lucien950 Jun 11, 2025
d63e880
update from master
Lucien950 Jun 11, 2025
e98bf8b
formatting
Lucien950 Jun 11, 2025
2635d5d
builds
Lucien950 Jun 11, 2025
fbd028a
building tests
Lucien950 Jun 11, 2025
ab1e27b
how you try to have a movement if you don't have any motion???
Lucien950 Jun 11, 2025
0f0c770
hehehaha
Lucien950 Jun 11, 2025
ac7ffa2
correctlogic
Lucien950 Jun 11, 2025
18f11ba
static optimizatoins
Lucien950 Jun 11, 2025
6c71d5c
init state
Lucien950 Jun 11, 2025
2d047b1
slightly better
Lucien950 Jun 11, 2025
b16aca6
moving charger stuff
Lucien950 Jun 11, 2025
ea8a992
precharge
Lucien950 Jun 11, 2025
0766509
forgot this
Lucien950 Jun 11, 2025
c3c5f91
Merge branch 'master' into quintuna/bms/statemachine
Lucien950 Jun 12, 2025
4d3ab27
wthelly
Lucien950 Jun 12, 2025
ce033aa
more fakes for segments
Lucien950 Jun 13, 2025
b58d3e5
Update from master :)))))
Lucien950 Jun 13, 2025
2f9faaa
precharge and semphores
Lucien950 Jun 13, 2025
f205af7
migrate tasks to jobs
Lucien950 Jun 13, 2025
3c739ac
builds well now
Lucien950 Jun 13, 2025
26568d7
trying to add IMD tests and BMS Tests Quintuna
KelmLelm Jun 13, 2025
069e238
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
KelmLelm Jun 13, 2025
fe8a665
passing precharge tests
Lucien950 Jun 13, 2025
237d11d
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
KelmLelm Jun 13, 2025
a68f053
more passing tests
Lucien950 Jun 13, 2025
ff4763b
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
KelmLelm Jun 14, 2025
7efc49a
build firmwar
Lucien950 Jun 14, 2025
e842d6c
fix tests
Lucien950 Jun 14, 2025
bd44125
more
Lucien950 Jun 14, 2025
a8306b6
latch enum fix
Lucien950 Jun 14, 2025
8d0f8d8
fault latch fixes
Lucien950 Jun 14, 2025
f42a690
transitions
Lucien950 Jun 14, 2025
e8359d6
Merge branch 'master' into quintuna/bms/statemachine
Lucien950 Jun 14, 2025
f8c3dd6
formatting
Lucien950 Jun 14, 2025
332f8a2
merge fuckup
Lucien950 Jun 14, 2025
c13cb26
Merge branch 'master' into quintuna/bms/statemachine
Lucien950 Jun 14, 2025
7417684
fixes
Lucien950 Jun 14, 2025
74dfeb8
redo semaphores
Lucien950 Jun 14, 2025
b3d80e4
passing all tests
Lucien950 Jun 14, 2025
2fd5865
Added some tests for latch faults and tractive system broadcasting. A…
KelmLelm Jun 15, 2025
0af6829
fixed over voltage fault setter and added cell temp faking (hopefully…
KelmLelm Jun 15, 2025
6c0c750
ops
Lucien950 Jun 16, 2025
d2d43ad
pp
Lucien950 Jun 16, 2025
add1877
moved irsstate enums to use the bms json enums instead and got the la…
KelmLelm Jun 16, 2025
2b976d6
formatting
KelmLelm Jun 16, 2025
3270f89
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
KelmLelm Jun 16, 2025
f45104f
fixed syntax issues
KelmLelm Jun 16, 2025
e54f96c
added broadcasting for current sensor ocsc pin and voltage sensor dia…
KelmLelm Jun 16, 2025
494247c
reverts
Lucien950 Jun 16, 2025
335fe85
e
Lucien950 Jun 16, 2025
69bd841
jobs diff rev
Lucien950 Jun 16, 2025
8fb2721
precharge
Lucien950 Jun 16, 2025
a64790d
ya
Lucien950 Jun 16, 2025
8312000
Fixbuild
KelmLelm Jun 17, 2025
92645c9
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
KelmLelm Jun 17, 2025
90b4da6
holy merge conflict
Aug 6, 2025
4635b72
update from master
Lucien950 Sep 5, 2025
a3bb108
builds now ig
Lucien950 Sep 5, 2025
79802a3
tests working?
Lucien950 Sep 5, 2025
d2ab01c
builds...
Lucien950 Sep 8, 2025
2f95ba1
added changes to testing framework to work on mac
yawollopkcaj Sep 17, 2025
1132aea
Minor changes from PR comments
KelmLelm Sep 18, 2025
6a0de48
formatting :))
KelmLelm Sep 18, 2025
4d40727
update from master
Lucien950 Sep 22, 2025
fa34647
fixed ish..
Lucien950 Sep 22, 2025
3a1c212
Added ifdefs for TARGET_HV_SUPPLY, not complete YET
KelmLelm Sep 22, 2025
1bc700b
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
KelmLelm Sep 22, 2025
7f40156
ifdef added in fault state
KelmLelm Sep 22, 2025
fa09d96
:(
Lucien950 Sep 22, 2025
686d1e3
enable hv power supply override
Lucien950 Sep 23, 2025
8d638fd
fix latching behaviour
Lucien950 Sep 23, 2025
1a2889e
readability
Lucien950 Sep 23, 2025
11fd21b
Fixed bugs with fakes, latches and cell voltage faking. Some ifdef st…
KelmLelm Sep 24, 2025
19bd065
wrote inital charger test
yawollopkcaj Sep 24, 2025
9025224
going back to jacks correct logic
AmirTajaddodi Sep 24, 2025
c94ca16
fixed timings for bms precharge retries tests
KelmLelm Sep 25, 2025
369e08a
All tests passing, think aux temp faking functions are off by a facto…
KelmLelm Sep 27, 2025
e67e869
Merge branch 'master' into quintuna/bms/statemachine
Lucien950 Sep 28, 2025
95049e4
precharge new level
Lucien950 Sep 28, 2025
227976b
precharge back up
Lucien950 Sep 28, 2025
7521c18
yo
pranay-o Oct 4, 2025
cfa2550
yo
pranay-o Oct 4, 2025
6c1c19d
added charger tests and fakes
yawollopkcaj Oct 4, 2025
b62d584
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
yawollopkcaj Oct 4, 2025
f6faf26
stays in drive, over/undervoltage warning
mattiaswong6 Oct 4, 2025
2620e6a
fixedd up last two tests, there wasn't any waiting for LTC broadcast …
KelmLelm Oct 18, 2025
e69bde4
Merge branch 'master' into quintuna/bms/statemachine
KelmLelm Oct 18, 2025
30f3cd3
how did this get here?
KelmLelm Oct 18, 2025
3dda90a
stuff
pranay-o Oct 18, 2025
a39cd5d
Merge branch 'quintuna/bms/statemachine' into hexray/bms/app_setup
pranay-o Oct 18, 2025
9a38d1b
done
pranay-o Oct 18, 2025
f40a415
Merge branch 'hexray/bms/app_setup' into balancingState
pranay-o Oct 18, 2025
16f9bbf
balancingstate and states
pranay-o Oct 18, 2025
b4dcadb
undid file associations
pranay-o Oct 18, 2025
0abd848
balacningstate
pranay-o Oct 18, 2025
1a6ed6e
completed my ticket
yawollopkcaj Oct 19, 2025
5de9c9a
got rid of weird _deps dir
KelmLelm Oct 21, 2025
9616e8a
Merge branch 'master' into hexray/bms/app_setup
KelmLelm Oct 21, 2025
aee2402
Add IRS module for BMS
pranay-o Oct 22, 2025
49a63d9
irs done
pranay-o Oct 22, 2025
4971b8b
Merge branch 'master' into hexray/bms/app_setup
pranay-o Oct 22, 2025
b7231d9
some component ffiles, some unfinished (plim, therm)
KelmLelm Oct 25, 2025
16227b6
adbms configs
mattiaswong6 Oct 25, 2025
88067b7
fans done
pranay-o Oct 29, 2025
809523a
adbms balance and internal
mattiaswong6 Oct 29, 2025
f446565
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
mattiaswong6 Oct 29, 2025
ff5cfb4
io bms shdn and thermistors added, also changes a few other app files
KelmLelm Nov 1, 2025
9c6b0ba
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Nov 1, 2025
1e066b6
fixed code review comments from kevin
yawollopkcaj Nov 1, 2025
84dd515
Merge branch 'quintuna/bms/statemachine' of https://github.com/UBCFor…
yawollopkcaj Nov 1, 2025
c2ef469
added io and app files (empty)
yawollopkcaj Nov 1, 2025
0f3a2ac
imd done
pranay-o Nov 1, 2025
a7aae87
format
pranay-o Nov 1, 2025
62e2368
prechargeDriveState done
pranay-o Nov 1, 2025
8b4d535
Merge branch 'master' into hexray/bms/app_setup
pranay-o Nov 1, 2025
c45935f
drive state done
pranay-o Nov 1, 2025
0536f68
fixes
pranay-o Nov 1, 2025
600e4d6
Revert "fans done"
pranay-o Nov 1, 2025
8dba876
Revert "Revert "fans done""
pranay-o Nov 1, 2025
1aef155
Revert "fans done"
pranay-o Nov 1, 2025
ae05078
ye
pranay-o Nov 1, 2025
cde8712
reverted canup I believe and a few other small changes
KelmLelm Nov 1, 2025
8aa0942
merge conflicts
KelmLelm Nov 1, 2025
3b8feba
formatting
KelmLelm Nov 1, 2025
fdd00b7
finally canup reverted??
KelmLelm Nov 1, 2025
98884fc
io stuff
pranay-o Nov 1, 2025
b5267b3
settings removed
pranay-o Nov 1, 2025
5f50da9
precharge app
yawollopkcaj Nov 5, 2025
96cbc26
jack io stuff done
yawollopkcaj Nov 5, 2025
5238489
intermittent commit, adbms balance and internals
Nov 12, 2025
26fe97f
added test folder
pranay-o Nov 15, 2025
5caa949
prelim jobs file, testing files (fakes as well mostly converted excep…
KelmLelm Nov 15, 2025
2c7cfb3
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Nov 15, 2025
b9fb829
adbms internal pecs and command funcs
Nov 15, 2025
80ed319
precharge
pranay-o Nov 15, 2025
c96d050
launch config fixes
pranay-o Nov 15, 2025
27f5a03
small additional testing changes
KelmLelm Nov 15, 2025
12278c6
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Nov 15, 2025
c82d25d
adbms internals fakes
Nov 15, 2025
eeed7e9
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
Nov 15, 2025
96e31ea
fixed shutdownnode syntaxes I think
KelmLelm Nov 16, 2025
2126cc8
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Nov 16, 2025
0da0dad
enable adc voltages
Nov 19, 2025
54956b8
ioc with spi
Nov 19, 2025
fa37bf5
build new ioc
Nov 19, 2025
056ae16
some tests
pranay-o Nov 21, 2025
1470272
moved over a lot of can msgs from quintuna, can be temporary. also tw…
KelmLelm Nov 23, 2025
566ce2a
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Nov 23, 2025
1766715
some tests
pranay-o Nov 26, 2025
fd66afe
hotfix
pranay-o Nov 26, 2025
bd7bf0f
imd fixes
pranay-o Nov 26, 2025
f5e2afc
stuff
pranay-o Nov 29, 2025
21a9c00
fixed a few cpp errors and added some tasks to task.cpp and fixed a f…
KelmLelm Nov 29, 2025
8af9516
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Nov 29, 2025
9f6c29d
prechargeCharge state fix
pranay-o Nov 29, 2025
7b6ed8f
more tests
pranay-o Dec 3, 2025
0323805
fixing build errors and io shdn fake implemented
KelmLelm Dec 3, 2025
5df6ff4
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Dec 3, 2025
ea3443e
temp-voltage transfer function and some imd fixes
pranay-o Dec 3, 2025
a4fa04e
temp-voltage transfer function and some imd fixes and drive tests
pranay-o Dec 3, 2025
b858e06
more build error fixees
KelmLelm Dec 6, 2025
d183295
Merge branch 'hexray/bms/app_setup' of https://github.com/UBCFormulaE…
KelmLelm Dec 6, 2025
d9b7ba5
adbms fixes
pranay-o Dec 20, 2025
cfec6ab
adbms driver
pranay-o Jan 7, 2026
1562302
added shared thermistor lut in shared and finished app thermistors fo…
KelmLelm Jan 16, 2026
7fee3cc
power limiting and math updates
yawollopkcaj Jan 21, 2026
d1cb2e3
Merge remote-tracking branch 'refs/remotes/origin/hexray/bms/app_setu…
yawollopkcaj Jan 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "0.2.0",
"configurations": [
"configurations": [
{
"name": "Debug Pytest",
"type": "python",
Expand Down Expand Up @@ -524,7 +524,7 @@
"name": "Debug Tests: BMS (Hexray)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build_fw_test/firmware/hexray/BMS/hexray_VC_test",
"program": "${workspaceRoot}/build_fw_test/firmware/hexray/BMS/hexray_BMS_test",
"cwd": "${workspaceRoot}",
"preLaunchTask": "Build Tests: BMS (Hexray)",
"linux": {
Expand Down Expand Up @@ -575,7 +575,7 @@
"osx": {
"MIMode": "lldb"
}
}
},
{
"name": "Debug Tests: FSM (Hexray)",
"type": "cppdbg",
Expand Down
85 changes: 84 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,88 @@
"--compile-commands-dir=build_fw_dev",
// "--compile-commands-dir=build_fw_test",
"--query-driver=/usr/local/bin/arm-none-eabi-gcc"
]
],
"files.associations": {
"__verbose_abort": "cpp",
"array": "cpp",
"cmath": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"limits": "cpp",
"stdexcept": "cpp",
"any": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"iomanip": "cpp",
"iostream": "cpp",
"istream": "cpp",
"mutex": "cpp",
"new": "cpp",
"ostream": "cpp",
"ranges": "cpp",
"span": "cpp",
"sstream": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"variant": "cpp",
"valarray": "cpp",
"__bit_reference": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__tree": "cpp",
"execution": "cpp",
"ios": "cpp",
"locale": "cpp",
"print": "cpp",
"queue": "cpp",
"stack": "cpp",
"format": "cpp"
}
}
1 change: 1 addition & 0 deletions _deps/googletest-src
Submodule googletest-src added at 58d77f
1 change: 1 addition & 0 deletions _deps/nanopb_repo-src
Submodule nanopb_repo-src added at 6cfe48
63 changes: 62 additions & 1 deletion can_bus/hexray/BMS/BMS_alerts.json
Original file line number Diff line number Diff line change
@@ -1 +1,62 @@
{}
{
"warnings_id": 401,
"faults_id": 402,
"warnings_counts_id": 403,
"faults_counts_id": 404,
"warnings": {
"CellUndervoltage": {
"id": 155,
"description": "Cell is critically undervoltage"
},
"CellOvervoltage": {
"id": 156,
"description": "Cell is critically overvoltage"
},
"CellOvertemp": {
"id": 159,
"description": "Cell is critically overtemp"
},
"ModuleCommunicationError": {
"id": 157,
"description": "Failed to communicate with ADBMS modules."
}
},
"faults": {
"CellUndervoltage": {
"id": 155,
"description": "Cell is critically undervoltage"
},
"CellOvervoltage": {
"id": 156,
"description": "Cell is critically overvoltage"
},
"CellOvertemp": {
"id": 159,
"description": "Cell is critically overtemp"
},
"ModuleCommunicationError": {
"id": 157,
"description": "Failed to communicate with ADBMS modules."
},
"TESTFAULT": {
"id": 999,
"description": "FOR UNIT TESTING ONLY DO NOT EVER EVER THROW"
}
},
"info_id": 405,
"info_counts_id": 406,
"info": {
"StackOverflow": {
"id": 450,
"description": "An RTOS task stack overflowed on the previous boot cycle."
},
"CriticalPrechargeFailure": {
"id": 451,
"description": "Precharge failed >3x"
},
"WatchdogTimeout": {
"id": 452,
"description": "Watchdog timeout detected."
}
}
}
65 changes: 55 additions & 10 deletions can_bus/hexray/BMS/BMS_enum.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,57 @@
{
"BmsState": {
"BMS_INIT_STATE": 0,
"BMS_PRECHARGE_DRIVE_STATE": 1,
"BMS_PRECHARGE_CHARGE_STATE": 2,
"BMS_PRECHARGE_LATCH_STATE": 3,
"BMS_DRIVE_STATE": 4,
"BMS_CHARGE_STATE": 5,
"BMS_BALANCING_STATE": 6,
"BMS_FAULT_STATE": 7
}
"BmsState": {
"BMS_INIT_STATE": 0,
"BMS_PRECHARGE_DRIVE_STATE": 1,
"BMS_PRECHARGE_CHARGE_STATE": 2,
"BMS_PRECHARGE_LATCH_STATE": 3,
"BMS_DRIVE_STATE": 4,
"BMS_CHARGE_STATE": 5,
"BMS_BALANCING_STATE": 6,
"BMS_FAULT_STATE": 7,
"BMS_CHARGE_INIT_STATE": 8,
"BMS_CHARGE_FAULT_STATE": 9
},
"ContactorState": {
"CONTACTOR_STATE_OPEN": 0,
"CONTACTOR_STATE_CLOSED": 1
},
"DischargePowerLimitCondition": {
"NO_DISCHARGE_POWER_LIMIT": 0,
"HIGH_TEMP_DISCHARGE_POWER_LIMIT": 1,
"LOW_VOLT_DISCHARGE_POWER_LIMIT": 2,
"LOW_SOC_DISCHARGE_POWER_LIMIT": 3
},
"ChargePowerLimitCondition": {
"NO_CHARGE_POWER_LIMIT": 0,
"HIGH_TEMP_CHARGE_POWER_LIMIT": 1,
"LOW_TEMP_CHARGE_POWER_LIMIT": 2,
"HIGH_VOLT_CHARGE_POWER_LIMIT": 3
},
"ImdConditionName": {
"IMD_CONDITION_SHORT_CIRCUIT": 0,
"IMD_CONDITION_NORMAL": 1,
"IMD_CONDITION_UNDERVOLTAGE_DETECTED": 2,
"IMD_CONDITION_SST": 3,
"IMD_CONDITION_DEVICE_ERROR": 4,
"IMD_CONDITION_GROUND_FAULT": 5,
"IMD_CONDITION_INVALID": 6
},
"ImdActiveFrequency": {
"IMD_0Hz": 0,
"IMD_10Hz": 1,
"IMD_20Hz": 2,
"IMD_30Hz": 3,
"IMD_40Hz": 4,
"IMD_50Hz": 5
},
"BalancingState": {
"BALANCING_DISABLED": 0,
"BALANCING_SETTLE": 1,
"BALANCING_BALANCE": 2
},
"ChargerConnectedType": {
"CHARGER_DISCONNECTED": 0,
"CHARGER_CONNECTED_EVSE": 1,
"CHARGER_CONNECTED_WALL": 2
}
}
11 changes: 9 additions & 2 deletions can_bus/hexray/BMS/BMS_rx.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"messages": []
}
"messages": [
"Elcon_Vitals",
"VC_Vitals",
"Debug_CanMode",
"Debug_Charging",
"Debug_SetBSPDTestCurrent",
"Debug_CellBalancing"
]
}
Loading