hytech-racing / MCU

https://hytech-racing.github.io/MCU/index.html
GNU General Public License v3.0
0 stars 0 forks source link

clean up data passage between objects (systems, interfaces) for legibility #78

Open Dopp-IO opened 5 months ago

Dopp-IO commented 5 months ago

replace parameters to tick functions with structs

e.g. torque_controller_mux.tick(a billion parameters) --> torque_controller_mux.tick(tcmux_intake_struct)

tcmux_intake_struct can be anonymously declared in the tick call. The advantage here is that parameters are given names.

e.g. torque_controller_mux.tick({.tick = tick, .dialMode = dashboardInterface.getDialMode(), ...})