Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3392755
something fix or not
Ikubimu Jun 26, 2025
58bcb5b
Working code refactor without orders and packets
jdmarmen Jun 27, 2025
8f37276
Modified some transitions
jdmarmen Jun 27, 2025
51295b5
Finished Comms.hpp implementation
jdmarmen Jun 27, 2025
638d277
First working order
jdmarmen Jun 27, 2025
afb72f2
Added udp packet sending logic
jdmarmen Jul 4, 2025
6afef34
Added packets
jdmarmen Jul 5, 2025
690dd0e
Changed some stuff from tapes + added missing comms functions
jdmarmen Jul 5, 2025
86310c8
Changed brakes and tapes stuff
jdmarmen Jul 5, 2025
992c46c
Added order logic for hvscu, lcu and bcu
jdmarmen Jul 8, 2025
d2416c3
Order ID's refactor + small fix in emergency order
jdmarmen Jul 8, 2025
143d17c
Working version also with pcu
jdmarmen Jul 10, 2025
4d8ba73
Fixes regarding bragink and cooling system + comms stuff
jdmarmen Jul 12, 2025
257fc32
Works no sense xd
jdmarmen Jul 14, 2025
a633ebc
We are gonna pass electrical lfg
jdmarmen Jul 15, 2025
8397cdf
added pcu
jdmarmen Jul 16, 2025
79b8175
Added recovery state
jdmarmen Jul 17, 2025
4c4b7de
use LCU and PCU
jdmarmen Jul 17, 2025
62ef3c1
Finished recovery + pcu and order ids
jdmarmen Jul 18, 2025
d4ca1fe
Added recovery status packet
jdmarmen Jul 18, 2025
0901b28
Added chill keepalives
jdmarmen Jul 19, 2025
c3b39ef
Added a bunch of keepalives
jdmarmen Jul 19, 2025
b74ef8d
Removed bmsl
jdmarmen Jul 19, 2025
f961fb4
XD
jdmarmen Jul 19, 2025
8eee0ac
Final version
jdmarmen Jul 22, 2025
0aaa32e
Merge branch 'main' into vcu-night-test
Cantonplas Jul 24, 2025
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
1 change: 0 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"decoders": [{ "type": "console", "label": "ITM", "port": 0 }]
},
"preLaunchTask": "CMake: build",
"stm32cubeprogrammer":"/home/danielcanto/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin",
},
{
"type": "cortex-debug",
Expand Down
76 changes: 75 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,80 @@
"vector": "cpp",
"deque": "cpp",
"string": "cpp",
"span": "cpp"
"span": "cpp",
"any": "cpp",
"barrier": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"coroutine": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cuchar": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"exception": "cpp",
"expected": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"source_location": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"type_traits": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"latch": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"ranges": "cpp",
"scoped_allocator": "cpp",
"semaphore": "cpp",
"shared_mutex": "cpp",
"spanstream": "cpp",
"sstream": "cpp",
"stacktrace": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"syncstream": "cpp",
"thread": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp"
}
}
2 changes: 1 addition & 1 deletion Core/Inc/Code_generation/JSON_ADE
Empty file.
65 changes: 65 additions & 0 deletions Core/Inc/VCU/Actuators.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#pragma once
#include "ST-LIB.hpp"

class Actuators {
private:
PWM Regulator_out1; // por caracterizar
PWM Regulator_out2;

DigitalSensor Regulator_in1;
DigitalSensor Regulator_in2;

/* PWM Pump_c1;
PWM Pump_c2; */
DigitalOutput Pump_c1;
DigitalOutput Pump_c2;

DigitalSensor flow1_input;
DigitalSensor flow2_input;

DigitalSensor SDC_sensor; // creo que tocará hacerlo exti

LinearSensor<float> PresionAlta;
LinearSensor<float> PresionRegulador; // baja
LinearSensor<float> PresionFrenos; // baja
LinearSensor<float> PresionCapsula; // por caracterizar

public:
enum Pump { PUMP_UNIDADES = 0, PUMP_PLACAS = 1 };

enum Regulator { REGULATOR_1 = 0, REGULATOR_2 = 1 };

Regulator selected_regulator;
Pump selected_pump;
float selected_regulator_pressure;
float regulator_1_pressure;
float regulator_2_pressure;

PinState regulator_1_input;
PinState regulator_2_input;

uint32_t selected_pump_duty;

PinState flow1;
PinState flow2;

PinState Sdc = PinState::ON;
bool contactors_closed = false;

float pressure_high = 0;
float pressure_regulator = 0;
float pressure_brakes = 0;
float pressure_capsule = 0;

Actuators();

void init();
void set_regulator_1(float value);
void set_regulator_2(float value);
void set_pump_1(uint32_t value);
void set_pump_2(uint32_t value);
void read_regulators();
void read_pressure();
void read_flow();
void read_sdc();
};
90 changes: 0 additions & 90 deletions Core/Inc/VCU/Actuators/Actuators.hpp

This file was deleted.

66 changes: 0 additions & 66 deletions Core/Inc/VCU/Actuators/Brakes.hpp

This file was deleted.

29 changes: 0 additions & 29 deletions Core/Inc/VCU/Actuators/Leds.hpp

This file was deleted.

Loading
Loading