Andrey Gusakov
d7ec871e7c
adc: rename EFI_ADC_LAST_CHANNEL to EFI_ADC_TOTAL_CHANNELS
2024-05-05 13:26:24 -04:00
rusefi
3e0fde22d2
linking to #6399
2024-04-23 16:34:22 -04:00
rusefi
fae665ec5c
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only:sad but configurable
2024-04-22 19:52:30 -04:00
rusEFI LLC
2519b3fa53
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only: work-around
2024-04-22 18:27:26 -04:00
rusEFI LLC
60d163207c
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only: more madness
2024-04-22 13:33:18 -04:00
rusEFI LLC
078376fe71
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only: more madness
2024-04-22 12:45:19 -04:00
rusEFI LLC
ea7cb49777
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only: let's not trust anyone
2024-04-22 10:57:14 -04:00
rusefillc
337f2ea588
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only: allowing override if we ever need it
2024-04-22 09:16:05 -04:00
Andrey
5a0761f533
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only:saving sensorVolts
2024-04-21 20:56:36 -04:00
rusefillc
f981d04c44
hellen on a bike: both TS and SD card logs report -32v on secondary TPS and secondary PPS #6376
...
only:saving sensorVolts
2024-04-21 20:15:56 -04:00
rusefillc
9105d5e17a
docs
2024-04-21 19:40:40 -04:00
Matthew Kennedy
4696848ad4
we often mean inline when we say static
2024-03-29 11:56:52 -04:00
Matthew Kennedy
3315aa9434
unused parameters
2024-01-07 22:36:20 -05:00
rusefillc
c7b155d97f
small-can FW is not well #5787
...
seems to be about EFI_ENGINE_CONTROL guarding too much of default settings
only:small-can-board
2023-12-13 00:15:43 -05:00
Andrey Gusakov
4aa779eaca
Style
2023-12-12 15:06:56 -05:00
Andrey Gusakov
4634a741c2
at32: at32_common: reuse some parts from STM32
...
This is temporally, some parts are quite different and need rework
2023-11-12 13:08:25 -06:00
rusefillc
2d9b835768
better guards
2023-11-04 09:45:22 -04:00
Andrey
b70f8f0b92
unused-variable is a nice error message to have #5683
2023-11-02 18:31:03 -04:00
rusefillc
2e62e6fc91
only:shall we be just a little less Toyota
2023-11-01 10:21:27 -04:00
rusefi
e8c45a2e7d
refactoring: reducing code duplication. Also, do we even care for critical error codes?!
2023-08-20 22:23:44 -04:00
rusefi
426bc8720e
console "spark 1" bench hands up proteus #5320
...
i feel lucky!
2023-06-11 23:23:17 -04:00
rusefillc
1c49d77fff
extra flexibility to facilitate ports
2023-05-31 23:36:30 -04:00
rusefillc
840a968bc8
code guard
2023-05-24 00:39:56 -04:00
rusefillc
228c1ac246
code guard
2023-05-24 00:13:07 -04:00
Matthew Kennedy
789aa2cf2a
remove proteus legacy build -> none exist in the wild
...
(cherry picked from commit 2fd26e948a2596db7256ec44a0e0c41dc8c3c749)
2023-05-19 10:28:38 -04:00
Andrey
51d0f6e347
it's going to be painful
2023-04-29 00:44:00 -04:00
Matthew Kennedy
61e5b4b1ad
change ObdCode to enum class builds firmware
2023-04-29 00:44:00 -04:00
Andrey Gusakov
342e7d1ac6
adc: unused suppress
2023-04-07 03:47:52 -04:00
Andrey G
a6ec708a6b
Support non-uniform dividers on ADC inputs ( #4938 )
...
* adc: support per-channel dividers
* S105: non-uniform analog dividers
* adc: default weak getAnalogInputDividerCoefficient() implementation
* adc: fix emulator compilation
2023-01-08 17:29:29 -05:00
rusefillc
5b159f0ff5
Support non-uniform dividers on ADC inputs #4938
...
maybe helping?
2023-01-08 15:37:51 -05:00
rusefillc
e58d375244
external muxes for internal ADC #3350
2023-01-07 22:09:43 -05:00
rusefillc
558f88ce23
external muxes for internal ADC #3350
2023-01-07 21:56:12 -05:00
Matthew Kennedy
1eb00e5ec9
adc resubscription of the same sensor ( #4947 )
...
* adc resubscription of the same sensor
* overload function name
* fix logic
* thermistors and map
2023-01-06 08:09:17 -05:00
rusefillc
b75f899973
efi::size
2022-10-27 20:35:37 -04:00
rusefillc
ea8f75a6cb
Adc unregister ( #4684 )
...
* Sensor: unregister on the fly #4683
* Sensor: unregister on the fly #4683
* Adc unregister #4684
* Adc unregister #4684
2022-10-20 09:33:27 -04:00
Matthew Kennedy
9d132676fd
consolidate analog vs. temp info commands ( #4646 )
...
* consolidate analog vs. temp info commands
* cleanup
* guard
2022-10-10 07:44:20 -04:00
rusefillc
6e71b72acc
refactoring - reducing API between FW and Java
2022-09-11 02:16:47 -04:00
Andrey
ab4b451195
os_access.h dead?
2022-09-07 15:56:45 -04:00
rusefillc
026a28d651
Adc mux ( #4379 )
...
* adc mux
* cypress is a special ADC size case
Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-26 14:12:00 +03:00
Matthew Kennedy
b99d90b006
Start -> start ( #4366 )
2022-07-21 15:17:32 -04:00
Matthew Kennedy
c6f46128d6
prototype overcurrent protected driver ( #4029 )
...
* stub passthrough protected driver
* plumbing
* include the thing
* signature
* dead
* tdg pdm build task
* s
* pdm pins
* tdg
* init properly
* remove gaps
* board doesn't fatal on start
2022-05-17 23:49:18 -04:00
Matthew Kennedy
bc6a87cadc
allow enum_class in rusefi_hw_enums.h ( #4104 )
...
* make things c++ friendly
* install various canaries in coal mines
* using is much clearer than typedef
* fixing builds
* lps25
* trigger includes were a mess
* c -> c++ cleanup
* os util
* why did so many include os_util.h?
* fwd declare
* cypress/kinetis
* s
* eg33 happy
* happy sim
* cypress usb
* pch
* cypress
* doesn't need to include all that
* h7
2022-04-25 20:38:16 -04:00
Matthew Kennedy
648f9e623d
fix proteus legacy vbatt ( #4092 )
2022-04-25 17:08:04 -04:00
Matthew Kennedy
d8073e8b27
remove mock adc ( #3888 )
...
* remove mock adc
* do these do /anything/?
2022-02-03 20:43:34 -05:00
Andreika
ada89312b5
hellen81 ADC trigger
2021-12-01 13:03:08 -05:00
Matthew Kennedy
8cdac4cac0
remove engine pointer passing ( #3556 )
...
* some
* more
* more
* the last?!
2021-11-16 04:15:29 -05:00
Matthew Kennedy
cb032fb1ea
(void) -> () ( #3550 )
...
* static functions with (void)
* more
* Revert "more"
This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.
* s
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
Matthew Kennedy
31ffb0add4
Fast adc API ( #3327 )
...
* dead fast tps
* oooooh map avg on hh7
* adc v4 fast support
* new fast API
* hardware.cpp
* adc v2
* warning
* guard
* no check required
* stub cypress/kinetis
* kinetis and cypress stubs
2021-10-07 08:29:01 -04:00
rusefillc
b917394354
my first Lua
2021-09-01 02:37:36 -04:00
rusefillc
f47320fd70
my first Lua
2021-08-31 12:32:05 -04:00
rusefillc
48a009fc33
Revert "Revert "memory savings ( #3195 )""
...
This reverts commit 0b3ef5f5
2021-08-27 06:18:05 -04:00
rusefillc
0b3ef5f553
Revert "memory savings ( #3195 )"
...
This reverts commit 52a24ee7
2021-08-27 02:32:31 -04:00
Matthew Kennedy
52a24ee773
memory savings ( #3195 )
...
* d
* dead code
* all your ram are belong to me
* turn off gpiochips we don't need
* save
* save by using the same file handle
* smaller stack ok
* these can be on the stack
* this is closer
* what about ccm?
* probing available
* now probe ccm
* ccm
* put stuff in ccm
* fsio
* memory usage
* memory
2021-08-26 23:05:31 +03:00
Matthew Kennedy
4603f875cd
missed a little bit ( #3192 )
2021-08-24 17:00:14 -04:00
Matthew Kennedy
a18b86a09b
start allowing ADC change while running ( #3100 )
...
* allow re-register of the same sensor
* add api to unsubscribe
* do it for tps
* clear the pin
* happy test
* maybe make afr happy for now
* tests build
* happy simulator
* active configuration
* check valid
* we need vbatt now
* manage all pin init in init_sensors.cpp
* don't need that
* cleanup
* thermistors
* do two phase reinit in the right place
* config vs engine
* finally the tests are happy
2021-08-24 16:41:16 -04:00
Matthew Kennedy
045db15dac
implement adc unsubscription ( #3149 )
...
* allow re-register of the same sensor
* adc unsub
2021-08-14 15:41:27 +03:00
Matthew Kennedy
d24f1462e2
even more pch ( #3112 )
...
* s
* more
* s
* f7
2021-08-04 19:30:52 -04:00
Matthew Kennedy
25414ebdad
yet more pch ( #3068 )
...
* big pch energy
* put back ramdisk stub
* tests are happy
* h743 nucleo
* kinetis
* I love deleting code!
* make stepper happy
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-03 22:05:01 -04:00
Matthew Kennedy
f70c844c60
H7 ADC triggered by hardware timer ( #3028 )
...
* config
* allow changing adc speed
* timer triggered ADC
* ICU on nucleo
* turn that off too
* 10khz
* make those default for all h7
* I can't type
2021-07-23 14:50:35 -04:00
Matthew Kennedy
09192cfc4d
fast adc callback ( #3031 )
...
* fast adc callback
* guard
* missed one
* now cypress will be happy
2021-07-23 14:19:59 -04:00
rusefillc
aee2ed4ba4
New hardware testing commands #2978
2021-07-17 13:42:10 -04:00
Matthew Kennedy
2ce7777865
don't require EXTERN_ENGINE in every file ( #2969 )
...
* move enginePins
* no more extern engine
* uses
* more
* extern config too
* put this where it belongs
* include correct header
* merge
2021-07-16 18:13:33 -04:00
Andrey
a926357a01
making code more testable
2021-07-14 22:37:05 -04:00
Andrey G
62cbc6db91
Adc fixes ( #2691 )
...
* ADC: save few bytes
* ADC: fix limit checking, add note for futher users
* ADC: not used anymore
2021-05-13 15:51:18 -04:00
Matthew Kennedy
f7581b1869
s ( #2683 )
2021-05-11 15:45:35 -04:00
Matthew Kennedy
5ba7577496
move FSIO aux analog inputs to sensor model ( #2669 )
...
* sensor entries
* init
* non-explicit for list init to work
* switch fsio
* no longer need this lua hook
* init
2021-05-09 19:47:37 -04:00
Matthew Kennedy
3f36d488bf
move ADC pin initialization ( #2660 )
...
* set the pin in adc subscription land
* remove from adc_inputs
* more subscriptions
* use our lib instead
2021-05-09 14:36:11 -04:00
Andrey G
0f4de02223
ADC: internalIndex should be used as getAvgAdcValue argument ( #2618 )
...
* ADC: internalIndex should be used as getAvgAdcValue argument
-plus output messages re-formated
* ADC: logger -> efiPrintf
2021-05-03 16:44:19 -04:00
Matthew Kennedy
742ea83bfa
Baro config ( #2591 )
...
* adjust API to allow i2c init to fail
* init
* proteus config
* 🎠 🎠 🎠
* buh
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-27 15:29:22 -04:00
Matthew Kennedy
bbb6b6dd14
remove simple cases of LoggingWithStorage ( #2569 )
...
* remove simple cases
* more simple
* serial
* s
* more
* try memory
* easy
* mmc acc
* that's how much memory
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-19 08:11:59 -04:00
Matthew Kennedy
3072d54717
dead code, warnings ( #2461 )
2021-03-15 10:23:19 -04:00
Matthew Kennedy
9d7436c062
implement ads1015 driver ( #2458 )
...
* first approximation of ads1015
* fix ads
* misc
* comment
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-14 19:02:42 -04:00
Matthew Kennedy
96a14fd649
ADC cleanup, enable oversampling on H7 ( #2437 )
...
* cleanup v2 adc
* simplify
* oversample on h7
* output 16b result
* port-ify ADC_MAX_VALUE
* simplify include
* guard for cypress
* make sim/tests happy
* 16x oversample + comment
* this check is uesless
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-08 14:50:50 -05:00
Matthew Kennedy
e264029fbc
STM32H7 Slow ADC ( #2421 )
...
* extract
* guard
* put some back
* put back
* slow is actually 500hz so slow is fine here
* no magic
* fix printFullAdcReport
* cast
* implement h7 adc ish
* analog switches
* bad merge
* no map avg on h7
* fix master while we're at it
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 20:58:56 -05:00
Matthew Kennedy
f22f318bdb
Extract slow adc ( #2402 )
...
* extract
* guard
* put some back
* put back
* slow is actually 500hz so slow is fine here
* no magic
* fix printFullAdcReport
* cast
* if we turn those off is it happy
* stub cypress/kinetis
* guard fast stuff better
* bad merge
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 19:55:09 -05:00
Matthew Kennedy
59eecab421
prep proteus config for h7 ( #2413 )
...
* prep for h7
* weak link that
* make those weak
* remove other stubs
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-28 16:57:57 -05:00
Matthew Kennedy
b1873b3d8b
set all thread priorities in the same place ( #2412 )
...
* unify thread priority
* header
* mmc
2021-02-28 07:30:45 -05:00
Matthew Kennedy
6fe0cadfc0
allow disabling fast ADC ( #2406 )
...
* mostly guard against no fast adc
* disable on h7
* guard more
* guard adc init
* you can't do that in c++
* we need that
* s
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-28 07:30:19 -05:00
Matthew Kennedy
39884f8934
use DECLARE_ENGINE_PTR for Engine class ( #2365 )
...
* engine cleanup
* do the cleanup
* one last spot
* expand_engine noop for firmware
* simulator
2021-02-16 16:58:54 -05:00
Matthew Kennedy
878794f9cf
properly put buffers in no-cache regions ( #2357 )
...
* configure for no cache
* this doesn't need a setting
* now we don't need invalidate
* reorder and comment
* mmc
* sw knock
2021-02-15 17:39:11 -05:00
Matthew Kennedy
85fab40d21
get mcu temperature within port ( #2326 )
...
* remove EFI_ADC_TEMP_SENSOR
* implement
* comment
* s
* switch adc_inputs over
* header
* s
* I think aligned-on-stack should work ok
* num channels
* cache safety
* move adc init too
* don't compile that file for the h7
* cypress & kinetis
* ports
* guard against bootloader
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-09 22:04:36 -05:00
Andrey G
3166076839
Some fixes prior to board pull request ( #2291 )
...
* ChibiOS: add support for STM32F765
This chip is used on Subaru EG33 p'n'p RusEFI board from Dron_Gus
* drivers: gpio: mc33810: commulative update
- use BIT macro
- fix wake-up method
- fix order of arguments in _add function
* port: stm32f4/7: detectCanDevice check for enabled interfaces only
* ADC: fix internal array size
internalAdcIndexByHardwareIndex should be EFI_ADC_LAST_CHANNEL size
couse adc_channel_e is used as index
* status LEDs: support status LEDs that driven by low level
2021-02-06 12:22:57 -05:00
rusefillc
5d1c248e4d
No hablo inglés
2021-01-28 20:43:23 -05:00
Andrey G
777979c3ca
Chibi os 20 ( #2212 )
...
* Update ChibiOS
* Fix Makefiles includes paths
* halconf.h: remove flash hack
* mcuconf: fix EXTI ptiorityes
* Digital Input: ICU: use designated initializers, initialize 'arr'
* ChibiOS: lis302dl fix
* ADC: update to new API
* UARTConfig: timeout_cb field, formating
* ChibiOS: remove _exit, _kill, _getpid
* Fix lis302dl
* Bump config versions
* chconfig_common: cosmetic changes
* stm32f4ems: commulative config update
* Update Simulator
* ALLCSRC already contain all needed ChibiOS files.
Same for ALLINC and ALLCPPSRC
* ChibiOS fix for Simulator
* ChibiOS: port lock/unlock hook and MMC over SPI timeout
* STM32F7: update configs
* STM32F7: update linker file
* Cypress: port ADC lld to ChibiOS-20
* Cypress: port SPI lld to ChibiOS-20
* Cypress: port CAN lld to ChibiOS-20
* Cypress: fix include path for rules.ld
* Cypress: update chconf.h and halconf.h for ChibiOS-20
* Kinetis: update ADC lld to ChibiOS-20
* Kinetis: update SPI lld to ChibiOS-20
* Kinetis: update UART lld driver for ChibiOS-20
* Kinetis: update chconf.h and halconf.h for ChibiOS-20
* Kinetis: fix include path for rules.ld
* Nucleo F746: update ld script
* Nucleo F746: fix compile
* Bootloader: fix compilation with ChibiOS-20, cleanup
* Bootloader: add way to pass crosscompiler using CROSS_COMPILE
* Debug build arguments
* Simulator: fix windows compilation
Exclude syscalls_cpp.cpp from compilation
2021-01-19 15:20:35 -05:00
Andrey G
b92e3086d0
Adc isAdcChannelValid helper ( #2188 )
...
* Guard define argument
* ADC: isAdcChannelValid
Check for both <= EFI_ADC_NONE and >= EFI_ADC_LAST_CHANNEL
Also check for value out of enum range (corrupted settings)
* Fix unit tests
2021-01-05 16:02:20 -05:00
Andrey G
2b5fc79aa7
ADC: correctly calculate cache invalidate range for STM32F7xxx ( #2021 )
...
Bug was introduced in 2312b0ae57
when
sample buffer was moved out of class. So sample become adcsample_t*
instead of adcsample_t[] and sizeof returns 4.
2020-12-05 10:14:33 -05:00
Andrey G
852fdcd4d1
adc: fix CPU temperature read for STM32F76x/77x ( #2020 )
2020-12-05 09:58:23 -05:00
Matthew Kennedy
4deb875204
fix warnings ( #2003 )
...
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-03 07:27:27 -05:00
rusefi
98605677f6
adc fixed #1979
...
partial revert
2020-11-22 15:31:33 -05:00
rusefi
eece5496da
ADC: fixes : #1979
...
more detailed error message
2020-11-22 12:57:04 -05:00
Andrey G
a285ba6743
ADC: fixes: ( #1979 )
...
* ADC: fixes:
-use enums
-internalAdcIndexByHardwareIndex array should be adc_channel_e size
-add sanity checks
-save few bytes of RAM
* ADC: use logical OR instead of math add
2020-11-22 12:23:27 -05:00
Matthew Kennedy
4e249889a6
implement fuel pressure sensors ( #1897 )
...
* add
* remove old
* remove more old
* makefile
* fix init
* patch up other stuff
* actually fix it this time
* raw output channels
* gauges, UI
* scaled channel
* fix field ordering
2020-10-23 07:31:47 -04:00
Matthew Kennedy
568ec91fc0
fix temp sensor & validate it ( #1879 )
...
* fix temp sensor & validate
* smaller here should work
2020-10-14 22:39:16 -04:00
rusefi
dfa3e69186
GDI Epic #1448
2020-10-11 23:39:40 -04:00
Matthew Kennedy
16bfd39bac
Remove dead & useless config ( #1834 )
...
* remove dead config
* remove enum
2020-09-29 06:34:39 -04:00
rusefi
c957541cf4
ADC progress
2020-09-21 06:10:25 -04:00
Matthew Kennedy
2ee9e837bb
guard against ADC buffer overrun ( #1812 )
2020-09-21 12:37:51 +03:00
Matthew Kennedy
3d6a6398ac
Dedicated sensors for wastegate + idle position ( #1805 )
...
* config
* add sensor
* listen to new adc channels
* fix
* add gauges to TS
* add gauge values
* TS UI
2020-09-18 10:04:07 +03:00
andreika-git
45c43bb6fd
porting adc_inputs.cpp (blindly) ( #1792 )
...
Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2020-09-15 14:48:32 -04:00
Matthew Kennedy
97cb9f45bd
logging simplification: switch bare functions to member functions: try the second ( #1794 )
...
* first pass
* first pass
* const means we don't have to check!
* static
* test fixup
* fix sniffer
2020-09-13 11:49:25 +03:00