Commit Graph

212 Commits

Author SHA1 Message Date
Benjamin Vedder 2156e67b8e Synced datatypes with the BMS firmware 2022-02-11 09:12:11 +01:00
rodale75 a30e259549 datatypes: Renamed CAN_PACKET_BMS_BOOT to CAN_PACKET_NOTIFY_BOOT.
This to have a generic approach applicable for all HW.

Change-Id: I030be71ed500ea6042ea17889c7731791bd704cb
Reviewed-on: https://review.gerrithub.io/c/RadinnAB/vedder_vesc_fw/+/532596
Tested-by: Mr. Jenkins <jenkins@radinn.com>
Tested-by: aleksandar rodzevski <aleks@radinn.com>
Reviewed-by: aleksandar rodzevski <aleks@radinn.com>
Reviewed-by: Björn Mellström <bjorn.mellstrom@radinn.com>
Reviewed-by: Daniel Nordahl <daniel.nordahl@radinn.com>
2022-02-10 14:23:36 +01:00
Benjamin Vedder 9527f94cf8 First lisp integration with vesc tool and enabled lisp by default 2022-01-29 03:36:34 +01:00
Benjamin Vedder 4958a91670 Added support for custom NTC and PTC motor temperature sensors 2022-01-24 00:36:53 +01:00
Benjamin Vedder 16385f1706 Renamed compression to lzo, added observer offset parameter 2022-01-12 12:27:45 +01:00
Benjamin Vedder af55c79a2a Renamed foc_f_sw to foc_f_zv 2022-01-06 20:44:00 +01:00
Marcos Chaparro 627c12b1ca bbshd: Ruggedize PAS against vibrations
Also includes an update to set power limits from other threads (like a display) and
prepares support for PAS torque sensors.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2021-12-28 11:17:53 -03:00
Benjamin Vedder 5d385c046b Added UAVCAN raw RPM command 2021-11-24 10:56:45 +01:00
Benjamin Vedder f6e78a09b6 Fixed measured MTPA mode, send ld_lq_diff detection result 2021-11-21 18:17:40 +01:00
Benjamin Vedder 3778dbe2e2 Added support for statistics 2021-11-11 01:08:21 +01:00
Benjamin Vedder c7a6a00f32 Update with new BMS commands 2021-11-09 13:33:28 +01:00
Benjamin Vedder 09bd14072c Added COMM_BALANCE_SELFTEST 2021-10-30 21:46:35 +02:00
Benjamin Vedder f1c4e713d7 Added MTPA modes 2021-10-24 18:10:00 +02:00
Benjamin Vedder 98587c961b Updated inductance calculation, include motor saliency in observer, separate setting for MTPA 2021-10-24 13:25:12 +02:00
Afzal b1ec844b2f PAS: add constant torque control type
For gearless electric bicycles, riding up the slope and during start,
good torque support from the motor helps the rider ride with less
effort. Pedal assist based on cadence provides higher torque with higher
pedalling speed. In the situations mentioned above, where user naturally
pedals slow, aid from cadence based system is less. On a geared setup,
changing to low gear comes to the rider's help.

Here another control type is provided - Constant Torque, whenever the
rider pedals, motor would provide constant torque. The torque value can
be set using 'PAS max current' setting thus acting as fine PAS assist
level.

This type of control is similar to 'Basic PAS, constant throttle' of
'PAS Control Schemes' [1], with the difference that throttle setting
in that article corresponds to speed, while here torque.

Also riding experience on some of the popular (not high end) e-bicycles
having PAS indicates they might be having this kind of control
internally.

[1] https://ebikes.ca/learn/pedal-assist.html
2021-10-05 13:05:31 +05:30
Johan Svard add855f6e6 blackmagic: Add cmd to write to target memory. 2021-10-01 16:29:57 +02:00
Vincent Manoukian f887c30e86 Add a poll CAN message. 2021-08-30 09:39:21 +02:00
Benjamin Vedder 91a19fa8b3 IMU improvements 2021-08-22 11:51:03 +02:00
Mitch Lustig f91872bf40 Merge branch 'dev_fw_5_03' into tiltback_config 2021-08-19 13:27:31 -07:00
Benjamin Vedder 7c6f1dd612 Added fusion IMU filter 2021-08-19 18:48:23 +02:00
Mitch Lustig fafe047730 Tiltback updates 2021-08-18 00:45:51 -07:00
Benjamin Vedder fc6825a1ae Added safe start modes 2021-08-16 17:48:06 +02:00
Benjamin Vedder df56397473
Merge pull request #327 from surfdado/tiltback_config
Balance: configurable speed/angle for each tiltback type
2021-08-16 14:32:32 +02:00
Dado Mista 848cb3165d Balance: configurable speed/angle for each tiltback type
Signed-off-by: Dado Mista <dadomista@gmail.com>
2021-08-15 16:30:11 -07:00
Mitch Lustig cd0d31fa03 Merge branch 'dev_fw_5_03' into tiltback_config 2021-08-08 20:06:51 -07:00
Benjamin Vedder 11e2062312 Pull request cleanup 2021-07-30 20:53:22 +02:00
Jakub Tomczak 3ed1a8f632 new faults 2021-07-30 15:36:21 +02:00
Dado Mista f46880d037 Balance: configurable speed/angle for each tiltback type
Signed-off-by: Dado Mista <dadomista@gmail.com>
2021-07-29 17:16:32 -07:00
Jakub Tomczak e951e3a374 Added AS504x Diagnostics 2021-07-28 17:14:10 +02:00
Benjamin Vedder 3c88ecb7aa Added configurable PID loop rate and more AUX port modes 2021-07-12 14:31:01 +02:00
Benjamin Vedder 1ab25a47db Added position PID offset support and KD_PROC term 2021-07-11 20:19:26 +02:00
Dado Mista 813d5b15fa Balance App: introduce new speed based variable tiltback
Nose angle adjustment, similar in purpose as constant tiltback
but it is proportional to erpm aka speed.

Signed-off-by: Dado Mista <dadomista@gmail.com>
2021-06-25 21:42:37 -07:00
Benjamin Vedder 029bd88981 Make CAN-enum 32 bits 2021-06-19 19:40:07 +02:00
Benjamin Vedder 32af87b08a Added aux out modes 2021-06-19 17:50:44 +02:00
Benjamin Vedder 75b84f1f2d Added kill switch support 2021-06-13 13:46:27 +02:00
Mitch Lustig d561c2669b Add balance loop time correction 2021-06-06 14:01:42 -07:00
Mitch Lustig de9400e461 Add brake timeout 2021-06-05 16:05:19 -07:00
Mitch Lustig d68fc0ff4f Balance: Updates
-Fix D term to use angle rather than error (which includes tilt steps)
-Switch TT to Biquad (Clear z1 z2)
-Split TT Relax speed
-Add Biquad to D term
-Add console command to graph specific variables
-Add console command to dump realtime data from specific variables
2021-06-01 03:20:00 -07:00
Mitch Lustig b237cf4b9f Add High Pass FIlter, implement current off delay, refactor constanttilt 2021-05-16 14:53:03 -07:00
Benjamin Vedder 77af43935a Removed outdated LED-support 2021-05-11 09:57:27 +02:00
Benjamin Vedder dfe17ac334 Dynamic QML-script write support 2021-05-01 13:28:46 +02:00
Benjamin Vedder f25144cc30 Removed iterative observer, added p_pid_gain_dec_angle 2021-04-26 23:14:05 +02:00
Benjamin Vedder 5767b703b7 Custom UI support 2021-04-24 22:36:00 +02:00
rodale75 b01930d586 commands: Added COMM_BM_HALT_REQ
Command added for being able to halt the CPU while connected via
blackmagic probe.
2021-04-23 15:58:24 +02:00
Mitch Lustig c9ed013f13 Fix low speed Full switch faults, Fix Booster, Improve turn/torque tilts 2021-04-17 18:05:24 -07:00
Benjamin Vedder 14b25e9aa4 Added foc_fw_q_current_factor 2021-04-15 10:04:28 +02:00
Benjamin Vedder 3a9d3bfe10 Remove old define 2021-04-11 19:44:31 +02:00
Benjamin Vedder 55dba9a79d Made odometer persist after firmware updates, added hw runtime counter 2021-04-11 19:36:11 +02:00
Benjamin Vedder 9dff7b42c4 Resolved conflict 2021-04-11 09:38:33 +02:00
Benjamin Vedder feb1be5fbd First attempt at field weakening and current controller windup protection improvement 2021-04-10 11:37:35 +02:00