-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #642 from dalathegreat/feature/bolt-ampera-battery
Feature: Add base for Bolt-Ampera battery
- Loading branch information
Showing
6 changed files
with
1,019 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
#ifndef BOLT_AMPERA_BATTERY_H | ||
#define BOLT_AMPERA_BATTERY_H | ||
#include <Arduino.h> | ||
#include "../include.h" | ||
|
||
#define BATTERY_SELECTED | ||
|
||
#define MAX_PACK_VOLTAGE_DV 4150 //5000 = 500.0V | ||
#define MIN_PACK_VOLTAGE_DV 2500 | ||
#define MAX_CELL_DEVIATION_MV 500 | ||
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value | ||
#define MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value | ||
|
||
#define POLL_7E4_CAPACITY_EST_GEN1 0x41A3 | ||
#define POLL_7E4_CAPACITY_EST_GEN2 0x45F9 | ||
#define POLL_7E4_SOC_DISPLAY 0x8334 | ||
#define POLL_7E4_SOC_RAW_HIGHPREC 0x43AF | ||
#define POLL_7E4_MAX_TEMPERATURE 0x4349 | ||
#define POLL_7E4_MIN_TEMPERATURE 0x434A | ||
#define POLL_7E4_MIN_CELL_V 0x4329 | ||
#define POLL_7E4_MAX_CELL_V 0x432B | ||
#define POLL_7E4_INTERNAL_RES 0x40E9 | ||
#define POLL_7E4_LOWEST_CELL_NUMBER 0x433B | ||
#define POLL_7E4_HIGHEST_CELL_NUMBER 0x433C | ||
#define POLL_7E4_VOLTAGE 0x432D | ||
#define POLL_7E4_VEHICLE_ISOLATION 0x41EC | ||
#define POLL_7E4_ISOLATION_TEST_KOHM 0x43A6 | ||
#define POLL_7E4_HV_LOCKED_OUT 0x44F8 | ||
#define POLL_7E4_CRASH_EVENT 0x4522 | ||
#define POLL_7E4_HVIL 0x4310 | ||
#define POLL_7E4_HVIL_STATUS 0x4311 | ||
#define POLL_7E4_CURRENT 0x4356 | ||
|
||
#define POLL_7E7_CURRENT 0x40D4 | ||
#define POLL_7E7_5V_REF 0x40D3 | ||
#define POLL_7E7_MODULE_TEMP_1 0x40D7 | ||
#define POLL_7E7_MODULE_TEMP_2 0x40D9 | ||
#define POLL_7E7_MODULE_TEMP_3 0x40DB | ||
#define POLL_7E7_MODULE_TEMP_4 0x40DD | ||
#define POLL_7E7_MODULE_TEMP_5 0x40DF | ||
#define POLL_7E7_MODULE_TEMP_6 0x40E1 | ||
#define POLL_7E7_CELL_AVG_VOLTAGE 0xC218 | ||
#define POLL_7E7_CELL_AVG_VOLTAGE_2 0x44B9 | ||
#define POLL_7E7_TERMINAL_VOLTAGE 0x82A3 | ||
#define POLL_7E7_IGNITION_POWER_MODE 0x8002 | ||
#define POLL_7E7_CELL_01 0x4181 | ||
#define POLL_7E7_CELL_02 0x4182 | ||
#define POLL_7E7_CELL_03 0x4183 | ||
#define POLL_7E7_CELL_04 0x4184 | ||
#define POLL_7E7_CELL_05 0x4185 | ||
#define POLL_7E7_CELL_06 0x4186 | ||
#define POLL_7E7_CELL_07 0x4187 | ||
#define POLL_7E7_CELL_08 0x4188 | ||
#define POLL_7E7_CELL_09 0x4189 | ||
#define POLL_7E7_CELL_10 0x418A | ||
#define POLL_7E7_CELL_11 0x418B | ||
#define POLL_7E7_CELL_12 0x418C | ||
#define POLL_7E7_CELL_13 0x418D | ||
#define POLL_7E7_CELL_14 0x418E | ||
#define POLL_7E7_CELL_15 0x418F | ||
#define POLL_7E7_CELL_16 0x4190 | ||
#define POLL_7E7_CELL_17 0x4191 | ||
#define POLL_7E7_CELL_18 0x4192 | ||
#define POLL_7E7_CELL_19 0x4193 | ||
#define POLL_7E7_CELL_20 0x4194 | ||
#define POLL_7E7_CELL_21 0x4195 | ||
#define POLL_7E7_CELL_22 0x4196 | ||
#define POLL_7E7_CELL_23 0x4197 | ||
#define POLL_7E7_CELL_24 0x4198 | ||
#define POLL_7E7_CELL_25 0x4199 | ||
#define POLL_7E7_CELL_26 0x419A | ||
#define POLL_7E7_CELL_27 0x419B | ||
#define POLL_7E7_CELL_28 0x419C | ||
#define POLL_7E7_CELL_29 0x419D | ||
#define POLL_7E7_CELL_30 0x419E | ||
#define POLL_7E7_CELL_31 0x419F | ||
#define POLL_7E7_CELL_32 0x4200 | ||
#define POLL_7E7_CELL_33 0x4201 | ||
#define POLL_7E7_CELL_34 0x4202 | ||
#define POLL_7E7_CELL_35 0x4203 | ||
#define POLL_7E7_CELL_36 0x4204 | ||
#define POLL_7E7_CELL_37 0x4205 | ||
#define POLL_7E7_CELL_38 0x4206 | ||
#define POLL_7E7_CELL_39 0x4207 | ||
#define POLL_7E7_CELL_40 0x4208 | ||
#define POLL_7E7_CELL_41 0x4209 | ||
#define POLL_7E7_CELL_42 0x420A | ||
#define POLL_7E7_CELL_43 0x420B | ||
#define POLL_7E7_CELL_44 0x420C | ||
#define POLL_7E7_CELL_45 0x420D | ||
#define POLL_7E7_CELL_46 0x420E | ||
#define POLL_7E7_CELL_47 0x420F | ||
#define POLL_7E7_CELL_48 0x4210 | ||
#define POLL_7E7_CELL_49 0x4211 | ||
#define POLL_7E7_CELL_50 0x4212 | ||
#define POLL_7E7_CELL_51 0x4213 | ||
#define POLL_7E7_CELL_52 0x4214 | ||
#define POLL_7E7_CELL_53 0x4215 | ||
#define POLL_7E7_CELL_54 0x4216 | ||
#define POLL_7E7_CELL_55 0x4217 | ||
#define POLL_7E7_CELL_56 0x4218 | ||
#define POLL_7E7_CELL_57 0x4219 | ||
#define POLL_7E7_CELL_58 0x421A | ||
#define POLL_7E7_CELL_59 0x421B | ||
#define POLL_7E7_CELL_60 0x421C | ||
#define POLL_7E7_CELL_61 0x421D | ||
#define POLL_7E7_CELL_62 0x421E | ||
#define POLL_7E7_CELL_63 0x421F | ||
#define POLL_7E7_CELL_64 0x4220 | ||
#define POLL_7E7_CELL_65 0x4221 | ||
#define POLL_7E7_CELL_66 0x4222 | ||
#define POLL_7E7_CELL_67 0x4223 | ||
#define POLL_7E7_CELL_68 0x4224 | ||
#define POLL_7E7_CELL_69 0x4225 | ||
#define POLL_7E7_CELL_70 0x4226 | ||
#define POLL_7E7_CELL_71 0x4227 | ||
#define POLL_7E7_CELL_72 0x4228 | ||
#define POLL_7E7_CELL_73 0x4229 | ||
#define POLL_7E7_CELL_74 0x422A | ||
#define POLL_7E7_CELL_75 0x422B | ||
#define POLL_7E7_CELL_76 0x422C | ||
#define POLL_7E7_CELL_77 0x422D | ||
#define POLL_7E7_CELL_78 0x422E | ||
#define POLL_7E7_CELL_79 0x422F | ||
#define POLL_7E7_CELL_80 0x4230 | ||
#define POLL_7E7_CELL_81 0x4231 | ||
#define POLL_7E7_CELL_82 0x4232 | ||
#define POLL_7E7_CELL_83 0x4233 | ||
#define POLL_7E7_CELL_84 0x4234 | ||
#define POLL_7E7_CELL_85 0x4235 | ||
#define POLL_7E7_CELL_86 0x4236 | ||
#define POLL_7E7_CELL_87 0x4237 | ||
#define POLL_7E7_CELL_88 0x4238 | ||
#define POLL_7E7_CELL_89 0x4239 | ||
#define POLL_7E7_CELL_90 0x423A | ||
#define POLL_7E7_CELL_91 0x423B | ||
#define POLL_7E7_CELL_92 0x423C | ||
#define POLL_7E7_CELL_93 0x423D | ||
#define POLL_7E7_CELL_94 0x423E | ||
#define POLL_7E7_CELL_95 0x423F | ||
#define POLL_7E7_CELL_96 0x4240 | ||
|
||
void setup_battery(void); | ||
void transmit_can(CAN_frame* tx_frame, int interface); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters