Commit Graph

39 Commits

Author SHA1 Message Date
rusefillc d8e65a2c24
suggestion to improve naming (#294)
* Rename GetInternalBatteryVoltage() to GetInternalHeaterVoltage()

* sampling, heater: fix Battery vs Heater naming mess

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2024-06-25 23:44:32 -07:00
Andrey G 94f2377bca
Gain vs loss confusion (#304) 2023-12-10 03:53:56 -08:00
Matthew Kennedy b23904362f
Conditional compile ts (#298)
* conditionally compile TS as it's a memory hog

* naming so dumps are easier to read
2023-11-22 18:26:40 -08:00
Matthew Kennedy 17acd065d3
cherry-pick timer from ECU and use it for sequencing logic (#289)
* enable timestamp api

* add timer class

* use unsigned integer for timestamps

* heater uses timers

* timer mocking and test adjustment
2023-11-15 17:42:37 -08:00
rusefillc 8646d10067
OpenBLT reset functionality (#259)
* ts: support reset and reset to OpenBLT commands

(cherry picked from commit 2f2fca401d7dc9a29e806013efec4d41570dd613)

* f1_xxx: ini: reset commands

(cherry picked from commit 628994ba0a70901edb9b59360646aa195b3307cf)

* typo

* f1_xxx: ini: update signature

(cherry picked from commit 7aa57fe09c6c684855838e36c9b65d8ae3618a7a)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-06-11 12:51:41 -07:00
rusefillc d8f8783d8c
OpenBLT: extract common code for f1 boards (#255)
(cherry picked from commit b892ed7520b20f00f1dbae88001798453a5bb07d)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 15:17:22 -07:00
rusefillc 025b687673
auxout: no need to invert PWM signal in software (#248)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 14:45:08 -07:00
rusefillc 94de9fd776
TS: report Nernst AC too, convert Nernst voltages to uint16 (#249)
* TS: report Nernst AC too, convert Nernst voltages to uint16

* TS: report Nernst AC too, convert Nernst voltages to uint16

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-05-03 14:51:34 -07:00
rusefillc 8bd19fcc2c
Aux2 (#243)
* auxout: manually fill pwm config

(cherry picked from commit a01876bc034264de5d6930bf2cc49cf0fc0cbb0a)

* auxout: some boards use primary PWM outputs instead of complementary

(cherry picked from commit c13b95441e7b284a36445c261199e96580e94ebd)

* auxout: implement ripple cancelation using inverted PWM

(cherry picked from commit 77cbc04990421b24021639b098ea6040af3a12f8)

* f1_common: default AUXOUT value is AFR voltage

with 'default' scaling 8.5 to 18.0 AFR is represented with 0.0 to
5.0V

(cherry picked from commit 0c62ab8f509ff0ab3ab4260e308ad4b55bd64e40)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-28 22:01:13 -07:00
rusefillc 2f90b66fdb
f1_rev2: remove duplicated definitions (#227)
(cherry picked from commit 10b482e759cf2f0aa0d55e53ad540737586e3991)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-17 16:25:44 -07:00
Matthew Kennedy 00cc305d02 GetCanConfig 2023-03-15 18:07:31 -07:00
Andrey G a9bc33abbd
LSU type from settings (#207)
* port: per-board SetupESRDriver() and GetESRSupplyR() functions

* Pick sensor type from settings

* f1_rev2: build helper for LSU4.2 FW
2023-02-25 11:46:36 -08:00
Andrey G cdf632652b
f1_X: adjust CAN timings for 64MHz CPU clock (cAN clock is 32MHz) (#177) 2022-12-22 08:08:03 -08:00
Matthew Kennedy a7961e178f bad signature copypaste 2022-12-06 16:59:36 -08:00
Matthew Kennedy 3807bb20e2 ini updates 2022-12-06 16:46:07 -08:00
Matthew Kennedy 3c0f930508 ini updates 2022-12-02 23:31:32 -08:00
Matthew Kennedy 320efe05a5 memory savings 2022-12-02 02:07:21 -08:00
Matthew Kennedy 91677672bf
use gcc 11.3 (#166)
* use gcc 11.3

* does the full image work?

* does this work?
2022-12-01 16:15:05 -08:00
Andrey G adae19db09
Extract common code for all F1 devices (#162)
* main: acctually call InitConfiguration()

* f1_rev2: enable EFL and MFS (Managed Flash Storate)

* f1_dual: enable EFL and MFS (Managed Flash Storate)

* f1 boards: extract common code

* port.h: add LoadDefaults() method to Configuration class

* f1 boards: store Configuration to MFS

* f1 boards: common getTsSignature() for all f1 boards
2022-09-19 16:31:30 -07:00
Andrey G 0a4a609db9
port: GetConfiguration() return reference, not copy (#161) 2022-09-19 15:27:08 -07:00
rusefillc 9ec8d56e2b
port.h: remove duplicate, GetConfiguratiuonSize() returns size_t (#152)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-09-15 11:56:17 -07:00
rusefillc 5f6e62a7e0
f1_rev3 and f1_rev2 both use same ini file (#149)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-09-07 19:56:23 -07:00
rusefillc a57682a4b6
Rev2 progress (#143)
* Rev2: define AUX output PWM device and channels

* Rev2: enalbe TIM1 used for aux outputs

* Rev2: aux pwm pins: no need to be 50MHz fast

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-09-06 16:53:22 -07:00
Andrey G cddcd0d88c
Multichannel (#134)
* Multichannel AFR

* heater: fixes for multi channel mode

* f1_dual: fix configuration names

* pump_dac: fixes for multi-channel mode

* pwm: fixes for multichannel mode

* pump_control: reference instead of pointer

* sampling: reference instead of pointer

* heater_control: reference instead of pointer

* sampling: comment about heater/battery voltage

* f0_module: fixes for multi-channel update

* f1_rev2: fix for multichannel AFR

* hello rev 3

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-08-29 17:19:30 -07:00
Andrey G 63ef4b7a10
TS more and more (#123)
* TunerStudio: simplify enable magic

* TS integration: livedata, FragmentEntry

* f1_dual: reorder TS hooks

* f1_rev2: dummy settings for TS

* f1_rev2: TS signature

* f1_rev2: TS ini file

* Integrate with TS interface

* livedata: access adapters, no extern, make livedata static

* FragmentEntry: no FragmentEntry()

* livedata: struct not needed
2022-07-18 12:31:09 -07:00
rusefillc 55f65ad02d
Ts top down (#104)
* TS top down

* TS top down

* TS top down

* TS top down

* Ts top down #104

removing the controversial part

* Ts top down #104

removing the controversial part

* docs

* fix build (switch to serial)

* f1_dual: UART->Serial

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 11:10:15 -07:00
Andrey G 18c22abdfa
bootloader: make bootloader flash area reserve optional (#111)
* bootloader: make bootloader flash area reserve optional

and increase config flash area to 8K

* f1_rev2: empty blflash section
2022-07-15 00:07:41 -07:00
rusefillc 1561c13a15
f1_rev2: OpenBLT: update gpio and interfaces setup (#97)
* f1_rev2: OpenBLT: update gpio and interfaces setup

* f1_rev2: OpenBLT: set default board name

* f1_rev2: no need to have bootloader region in main app LD file

* f1_rev2: use gpio settings from application include file

* f1_rev2: OpenBLT: update gpio and interfaces setup

* f1_rev2: OpenBLT: close backdoor

* f1_rev2: OpenBLT: fix uart setup

* f1_rev2: OpenBLT: gracefully close CAN after use

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-04 03:50:31 -07:00
rusefillc 0119d8e716
comments (#101)
* comments

* comments

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-03 20:48:42 -07:00
rusefillc 1454c10713
AUX outputs (#95)
* AUX outputs

* Rev2: define AUX output PWM device and channels

* Rev2: enalbe TIM1 used for aux outputs

* Rev2: define aux output gain

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-03 12:11:12 -07:00
rusefillc 542601da41
Board Rev 2 (#98)
* Board Rev 2

* f1_rev2: fix for new AnalogResult format

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-03 00:00:43 -07:00
rusefillc d1a2ee2b5b
Rev 2: default settings for LSU4.9 (#99)
* Rev 2: default settings for LSU4.9

* Rev2: LSU 4.2 and ADV ESR drive pins

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-03 00:00:17 -07:00
rusefillc 1efc499126
Rev2: GD32 ADC workaround (#96)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-02 13:48:27 -07:00
rusefillc 0430e4a7ba
board: common make script (#73)
* board: common make script

(cherry picked from commit cb087c60e9)

* common_make -> build_f1_board

* f1_rev2: use build_f1_board.sh helper

* Add encedo hex2dfu tools (bin for linux and win)

See https://github.com/encedo/hex2dfu

* Makefile: priduce srec too

* f1_rev2: OpenBLT: build bin and hex files

* f1_rev2: OpenBLT: optimize for size to fit into 8K flash

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-02 13:47:55 -07:00
rusefillc 2fa9549d83
0701 rev2 2 (#91)
* Rev 2: VM_RESISTOR_VALUE

(cherry picked from commit 84ae91fc67cf6764afd5b00210edbc3cfe4444a5)

* Rev 2: default settings for LSU4.9

(cherry picked from commit 5a1fe84bc1ec8d7ee6e0a5f2906a1b18d2ff8a8e)

* Per-board VM_RESISTOR_VALUE

(cherry picked from commit 0bdd19e058db579bed13488066df1176ea9addb2)

* Rev2: ID correct pins

(cherry picked from commit 59e4b36ad9bc7c166c3dae7e25b6317caf562056)

* Rev2: LSU 4.2 and ADV ESR drive pins

(cherry picked from commit 2f2b4399431136951fe2fa6819f44ba28c3cda17)

* Rev2: aux pwm pins: no need to be 50MHz fast

(cherry picked from commit b0af5c07c391438ca561118174df498207255f3b)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-01 15:57:05 -07:00
rusefillc 076406e4b0
f1_rev2: add OpenBLT (#92)
(cherry picked from commit 85e1ac8e5e75e22b247db0f5a512656453425729)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-01 12:12:24 -07:00
Andrey G d3d260b828
f1_rev2: set O0 optimization level due to issue with ADC on GD32 (#94) 2022-07-01 12:10:28 -07:00
Andrey G 5ec79b52a5
f1_rev2: this is single channel board (#93) 2022-07-01 12:03:48 -07:00
rusefillc 7d8eaab3d1
Min rev2 (#90)
* Board Rev 2

(cherry picked from commit 2f1e2bd3e27fdfd43f0ccf8292aacfb1194060fc)

* CI good

(cherry picked from commit 2163af402ebc40f76fa53ac8f1648949b12aa50f)

* min r2

* min r2

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-01 01:17:04 -07:00