### ESCargot #### Unreleased * Configuration and upgrading: * Both configuration signatures change (MCCONF 809067894, APPCONF 1761661629), so this firmware needs ESCargot Tool, which finds its parameter set by signature. It reports upstream's version number, 7.01, which no longer says which layout it carries; stock VESC Tool 7.01 cannot read or write its configuration. * The motor and app configurations no longer match what is stored, so both are reset to defaults on the first boot after upgrading. The app configuration keeps its CAN ID and baud rate. Save both from VESC Tool before updating and restore them afterwards. * A firmware update keeps the motor and app configurations, the scripts' EEPROM settings (eeprom-store-i) and the hardware variables. The bootloader erases flash sectors 0 to 7 before writing the new firmware, and the emulated EEPROM is sectors 1 and 2, so every update, even to the same build, left all of them at their defaults (no fault is logged, as an empty EEPROM passes the CRC check) and only a Tool that restored its own copy afterwards hid it; upstream carries only the odometer, run time, CAN ID and baud rate across. The jump to the bootloader now copies the EEPROM to the backup SRAM, and the new firmware's first boot writes back what the bootloader erased. A configuration goes back only into a firmware with the same signature and size; otherwise it is reset to defaults as before. The copy names the update it was made for (the staged image's size and CRC) and is used by that one only, so a copy left by an update to firmware without this cannot put back older settings at a later update. It takes effect from the update after the one that installs this firmware, and a power cut during the update loses the copy. Seen on the bench since 2026-10-29; swapping the board's bootloader for upstream's generic one did not help, as both erase the same sectors. Twenty-two boards without the room for it (make/flash-trim.mk, CONF_STASH_TRIM_BOARDS, HW_NO_CONF_STASH) still lose their EEPROM at every update. Host test tests/conf_stash. * Dual-motor boards keep motor 2's configuration. The emulated EEPROM copies only the variables in its table to the fresh page when one fills up, and upstream's table (conf_general_init) listed motor 1's configuration and not motor 2's, although NB_OF_VAR leaves room for both: motor 2 was reset to defaults at the boot after the first page swap following a store. Host test tests/ee_vartab. * A stored crash report does not survive an update that moves the section it lives in. Read it with crash_diag or VESC Tool before updating if it matters. * Cold regen taper, on by default (Motor Settings > General > BMS: BMS Limit Mode's Cold Regen, Cold Regen Start 5 °C, Cold Regen End 0 °C). Charging a lithium cell below about 0 °C plates lithium in it, and regen charges the battery: with a BMS reporting cell temperatures, regen current into the battery (the battery regen limit) is scaled from full at the start temperature to none at the end, by the coldest cell. Discharge is not limited, and without a BMS, or 2 s after its temperatures stop, nothing changes. The coldest cell is the BMS's Cell Min sensor when it sends the 6.06 sensor order (data version 1), else the coldest of all its sensors; the CAN format is unchanged. Scripts read it with (get-bms-val 'bms-temp-cell-min) and 'bms-cold-regen-scale (Lua vesc.get_bms_temp_cell_min and vesc.get_bms_cold_regen_scale), and COMM_GET_VALUES appends both as bit 23, which ESCargot Tool shows on its BMS page. Host test tests/bms_cold. To make room for it, the CAN event fixes and the safety round, ubox_single_85_200, flipsky_60, stormcore_100s and 75_300_r2 (and their _no_limits) leave out gesture cruise control (HW_NO_GESTURE_CRUISE), and gp that and also carrying its configuration across an update (HW_NO_CONF_STASH); their settings stay and do nothing. With CPPM moved to a package, ubox_single_85_200, flipsky_60, stormcore_100s (and their _no_limits) and gp leave out the native-library PPM input (HW_NO_PKG_PPM: the cppm_input package refuses to load there, as those boards had no CPPM before either), and gp the hold at full brake and the hill hold (HW_NO_BRAKE_HOLD). LispBM and Lua builds alike; make/flash-trim.mk lists them. * A script setting the ADC app's buttons no longer keeps the input timeout from firing. Upstream refreshes the timeout in app-adc-detach and in the cruise and reverse button overrides (app_adc.c), none of which carries a throttle value, so a script that sets them periodically (a display package does on every frame) kept a stopped UART or CAN master's, or another script's, last command running for as long as it ran: on the bench more than 5 s at 33k ERPM, against 0.25 s without it. Only the throttle and brake overrides, which stand in for the pins, refresh it now. Host tests tests/app_adc and tests/timeout_callers. * The input timeout is per input. Upstream's is one switch: any input's refresh keeps every motor command alive, so a CAN master that stopped, a UART remote that went away, or a script that set a current and then stopped kept driving for as long as anything else was alive: VESC Tool's alive packets, another script, a display package feeding the ADC app's overrides with the app off. Now each thread that commands the motor is an input, a command makes its input the motor's owner (last writer wins, per motor on dual controllers), and a motor whose owner has not refreshed within the timeout gets the timeout brake current whatever else is alive; with nothing alive at all both motors do, as before. VESC Tool's alive packets keep VESC Tool's own commands on the port they came in on; commands forwarded over CAN (VESC Tool through an Express) are an input apart from the CAN_PACKET_SET_* commands of a CAN master, which count as one input whatever node sends them (the frames carry no sender); all LispBM scripts are one input, Lua another, native-library threads a third. The ADC and PPM apps detached for a script, and the nunchuk/remote output, take their input from the overrides or packets that feed them, from whichever thread those come, and brake when those stop although other inputs are alive. While detection or a beep has the motor locked, the timeout is as upstream's. The kill switch and the timeout brake current are unchanged. Known limit: all LispBM packages are one input, so one package's refresh keeps another's command alive, and native-library threads are one input between them. timeout_has_timeout() (the timeout bit in COMM_GET_VALUES' status, and the native-library interface's) now means that a timeout brake is on, on either motor, rather than upstream's "no input at all is alive"; it can be set while other inputs are alive. Host tests tests/input_timeout (the real timeout.c, single and dual motor; `make old` shows its new tests failing on the previous one), tests/app_adc, tests/app_ppm and tests/timeout_callers. * Disabling app output now stops the motor. app-disable-output (and VESC Tool's disable, and the Lua binding) stopped the apps commanding, but a motor already running kept their last command (upstream issue 655), so a script that disabled output to switch off or lock a scooter left the motor driving until something else stopped it. The call that turns output off now sets the motor current to zero; calls while it is already off do not, so scripts that keep disabling output in order to drive the motor themselves work as before. * Motor detection reports a failed flux linkage measurement. Upstream overwrote the result of the check with success, so a flux linkage of zero or less was written to the configuration and the wizard reported success; it now fails with -10 (flux linkage detection failed) and leaves the configuration as it was, on both motors of a dual controller. Host test tests/detect_foc. * Motor detection keeps your current limit: the motor current it works out from the allowed heat (i_max = √(loss / R / 1.5)) now only lowers the motor current limits you had set before it ran, never raises them, on both motors of a dual controller and on each controller of a CAN detection. Upstream wrote i_max as the limits, capped only at the board's hardware limit, so a large motor at the 400 W setting with 3.48 mΩ got 276.8 A whatever limit had been set. The absolute current limit is still set to 1.5 times the limit kept. The board's default limit counts as a limit: after a configuration reset, detection leaves at most that, and a higher limit is set by hand. Its test spins stay within that limit too: the flux linkage spin (i_max / 2.5) and the hall or encoder detection (i_max / 3) are held at the limit set before detection, so the same motor spins at 60 A rather than 110.7 A and 92.3 A, and a spin held there that fails returns -11 rather than -10 or -1, which ESCargot Tool explains. The resistance and inductance measurement is unchanged. Host test tests/detect_foc. * conf-get with 2 (the hardware limits) reports l-max-vin and l-min-vin from the board's input voltage limits. Upstream filled both from the absolute current limit. Host test tests/conf_get_limits. * Asking without taking the print port: COMM_QUIET (167, private to ESCargot) wraps a packet, which is processed and answered on the port it came from, without making that port the one prints and unasked packets go to. A board polling the controller through its BLE module (vesc_express's ble_link) uses it, so the controller's prints stay where they were instead of following every poll onto the radio. Plain packets take the port as before. Host test tests/reply_port. * A reply on CAN no longer goes round between controllers for ever. A reply (sent with commands_send 1) goes on to where replies are relayed, and when no CAN forward had set that, it was the port of the first packet the controller ever processed; on a controller reached only over CAN that is CAN itself, back to the node that asked it last. Two controllers whose scripts ask each other something (can-cmd, the CAN log), or three asking round in a ring, then passed every reply between them without end, one more with each new reply, in frames that outrank status and ping: the bus filled until a reboot, pings went unanswered and a CAN scan came back empty. A reply is now not relayed back to the node it came from, and CAN (or a packet that wants no answer) never becomes the default; a CAN forward still sets it, including over CAN for a forward of several hops. ESCargot's Express firmware has the same fix. Host test tests/can_bounce. * Sampled audio on the motor with no script: COMM_AUDIO_STREAM (164) takes signed 8-bit samples a chunk at a time into a 400 ms ring feeding the FOC sample player, so VESC Tool can play sound files on the motor while a script, such as a logger, keeps running. Optional interpolation between samples; dropped chunks are counted. * Current controller angle lead: Motor Settings > FOC > Current Controller Angle Lead (foc_cc_lead, in control periods) applies the voltage the current controller computes at the angle the rotor will have reached when it takes effect, rather than at the angle the currents were sampled at. With few PWM periods per electrical cycle the voltage otherwise lands behind; in simulation a lead of 1 to 1.5 periods held the current within 5 % down to 5.6 periods per cycle. 0, the default, leaves the transform as it was. * Motor temperature: the Table sensor type takes six temperature and resistance points from the app configuration and interpolates between them, for a thermistor that is none of the built-in types. Dual-motor boards share one table. The default points are the 10k beta 3380 NTC. * Minimum pulse width: a board's hwconf can set HW_MIN_PULSE_NS, and the FOC modulator then drops or stretches any high or low pulse shorter than it to whichever is nearer, so the phase average stays within half that minimum of what was asked. An IGBT given a pulse shorter than it can switch conducts partly or overlaps its partner; VESC had no such limit. * Sound on the motor is turned down as the battery nears full. Tones and sampled audio are a voltage added to the FOC output, and the half of each cycle that flows back charges the battery; they ignored the regen taper (l_battery_regen_cut_start to _end), and on a full 20S pack sampled audio tripped the overvoltage fault thousands of times in one session. Both are now scaled by that taper. * Startup tune: Motor Settings > FOC > Startup Tune plays a short built-in tune on the motor once the controller has booted and calibrated, so you can hear that it is on. Off by default. Its volume is a current, turned into a voltage per note from the measured resistance and inductance and never above 5 V; it does not play in BLDC or DC mode, before the motor is measured, while it turns, or with a fault active. * Gesture cruise control in the ADC app, off by default (App Settings > ADC, Gesture Cruise Control). Riding above a minimum speed (8 km/h) with the throttle held, three full squeezes of the brake lever within 1.5 s hold the speed of the moment the lever is let go, through the motor's speed controller, so the current, temperature and battery limits still apply. Each squeeze brakes as normal. It ends at once on the throttle or the brake past 15 %, a fault, a throttle wiring fault, the brake signal outside its travel, a sudden jolt in current or wheel speed, speed under the minimum, the reverse button, wheels on CAN disagreeing with traction control on, or any reconfiguration, and the throttle then drives nothing until it has been back at rest. It needs a control type with a separate brake input (Current No Reverse Brake ADC2 or Current Reverse Button Brake ADC2); with it on, the brake past 5 % always zeroes the throttle there. COMM_GET_DECODED_ADC appends its state after the four values older Tools read, and cruise_status prints it. A board short of flash can leave it out with HW_NO_GESTURE_CRUISE. * Safe start after braking in the ADC app, off by default (App Settings > ADC, Safe Start After Brake; 'adc-safe-start-brake in conf-get/conf-set). After any brake (the brake input ADC2 past the deadband, or past 5 % where the brake already cuts the throttle; the brake button of Current No Reverse Brake Button; the brake half of a center lever; the PAS brake switch, including app-pas-override's), the throttle drives nothing until it has been back at rest, so a throttle held through a stop, or pressed before the brake is let go, no longer drives the motor the moment the brake opens. While braking the throttle is cut. The throttle is the one the app acts on, so a script's app-adc-override follows the same rule. Brake and regen commands are unchanged; the current control types only (duty and speed control would brake on a zeroed throttle). A hill start with the throttle held against the brake no longer works. * Hold at full brake in the ADC app, off by default (App Settings > ADC, Hold at Full Brake): stopped (under brake_hold_erpm, 100 ERPM, for 0.2 s) at 90 % brake or more with a FOC motor on hall sensors or an encoder, the rotor is held where it stands by brake_hold_current (10 A) along its own axis (mc_interface_set_openloop_phase at the sensor's angle), capped by the motor current limits. It lets go on the throttle, the brake under 70 %, the rotor turned past 90 electrical degrees, a fault, the kill switch, an ADC override timeout, disabled output, the throttle guard or range check, and does not hold again until the brake has been eased. Never on sensorless, HFI or AB-encoder setups. * Hill hold in the ADC app, off by default (App Settings > ADC, Hill Hold): stopped (under brake_hold_erpm for 0.2 s) with the throttle let go, on a FOC motor with hall sensors or an encoder, a wheel that then turns backward by two hall steps (100 electrical degrees of rotor angle, not ERPM, which is noisy near zero) is held where it is with the hold current, as the hold at full brake holds; rolling forward never is. For letting go of the brake on a hill. It lets go on the throttle, on what the hold at full brake lets go on, and when forced past 90 electrical degrees; pushing the bike backward on purpose, it catches once and then walks back freely until the throttle or brake is used. Not with reverse selected. * CPPM (PPM-sum) input is a package: install cppm_input (ESCargot Tool's package store) and set App Settings > PPM > CPPM, Input Mode to CPPM. The package decodes up to 12 channels on the one PPM wire, the throttle from any of them, mapped as a single pulse is, with differential (tank) steering, a separate brake channel and a kill or reverse switch, all set on its own page; the firmware keeps the input capture and the failsafe (no frame, no edge, the kill switch or a missing channel brake with the timeout's brake current until the throttle is back at rest, and so does the package being stopped, erased or updated while it drives). The firmware's own CPPM decoder and mixing, and their 15 cppm_* settings in the PPM app configuration, are gone: Input Mode is what is left. With CPPM selected and the package not running the PPM app brakes, as with no signal, and COMM_GET_DECODED_PPM's reply carries one more word saying so (low 16 bits the features packages provide, high 16 the ones configured that nothing provides; ESCargot Tool shows "configured but not running"). get-ppm-ch (Lua vesc.get_ppm_ch) stays and returns nil. With Input Mode at Single Pulse the app and decoder make the same commands as before CPPM, bit for bit (tests/app_ppm). See documentation/ppm_cppm.md. * Native libraries get ESCargot's own table (lispBM/c_libs/vesc_c_if_escargot.h, at 0x1000FE00 beside upstream's, append-only, with a magic, a version and a count so a library can refuse to load on firmware without an entry), version 1: the PPM pin's raw capture, the PPM app detached for a library and app_ppm_override_ex with the firmware's failsafe, and the features a library reports running. A native library that was unloaded, stopped, or failed its init left the firmware calling into it (CAN, FOC-ISR, app data, IMU, encoder, custom config, reply, terminal and shutdown hooks) while its flash area was erased by the next update or package install; whatever a library set is now undone when it goes. Host tests tests/c_lib_unload, tests/capture_ring, tests/app_ppm, QEMU test_cppm_lib. * Throttle wiring guard in the ADC app, on once the throttle's voltage range is narrowed from the stock 0 to 3.5 V (as ESCargot Tool's Simple throttle check does); the stock range behaves as before. Stock already brakes while the signal is out of range but lets go on the first sample back in it, so a flickering wire handed back whatever the throttle read, mid-twist a surge. The guard tells an open signal or supply wire (below the range), an open ground or supply on the signal (above it) and a loose plug (a jump of over 60 % of the travel between samples) apart, latches after 20 ms, and holds the output off until the throttle has been released and in range for 0.5 s. throttle_status prints the state, the fault and the counts for ESCargot Tool. A script driving the throttle through app-adc-detach is not guarded. * Several packages on one board: the code and QML areas hold a table of packages, each with its own LispBM context or Lua environment, its own range of the custom EEPROM settings, imports and events, installed, listed and removed with COMM_PKG (166) by ESCargot Tool; tool/docs/multi-package.md describes it. A single script loaded as before still works and is the first package. The table code is shared byte for byte with ESCargot's Express firmware. * Compacting a package area copies its packages through the LispBM constant sector and erases the area; a power cut in between lost every package. The copy now carries a checked header, and the next boot finishes the job, so a cut at any step leaves either the old packages or the result. * The emulated EEPROM cannot delete, so a removed package's settings range is not erased. * The input timeout fires on Spintend UBOX boards. Their power-key thread (hwconf/Ubox, 75, 100 and 126 V) refreshed it every 10 ms whatever else happened, so a CAN slave whose master died, a UART or BLE remote that went away, or a script that set a current and stopped kept the last command for good. The kill switch was not affected. Host test tests/timeout_callers, which lists every caller of timeout_reset() against the input it stands for. * foc-play-tone and foc-play-samples no longer refresh the input timeout. A tone leaves the motor's current set point as it was, so an alert tune kept a dead UART or CAN master's last current alive for as long as it played. An idle board still plays them. tests/timeout_callers. * A motor held at duty 0 from a standstill (the ADC duty types at zero throttle, set-duty 0, the speed controller below its minimum ERPM) no longer stays shorted as the wheel is pushed or rolls faster. The duty controller compared the request with the applied modulation, which under the short is 0, so the short stayed on, its current rising with speed until the ABS overcurrent fault. Above the speed where the short's current (flux x speed / resistance) would pass the current limit, the motor now brakes toward zero duty at the current limit, as it does when duty 0 is asked for at speed. Host test tests/foc_duty_short. * foc-beep is refused above 300 ERPM. It commands duty 0 under the motor lock for its duration, which at speed brakes at the current limit and shuts every input out. * Offset calibration (at boot, in the detection wizard, foc_dc_cal, conf-dc-cal) locks motor commands out and stops the motor first; tones and sampled audio refuse meanwhile. It never took the lock, so a script holding a current, or any command arriving during it, restarted PWM under the measurement and the offsets carried that current. tests/foc_dc_cal. * ADC app: a fault from the stock range check no longer hands back the ramp's carried-over level. The ramp ran on the out-of-range reading while output was held, so with safe start off and a slow ramp_time_neg the motor was driven after the signal came back with the throttle released; output now ramps up from zero. With "use filter" on, the range check reads the pin rather than the smoothed value, so a contact flickering faster than the filter is held off sample by sample instead of being averaged into the command (only with the range narrowed from 0 to 3.5 V). Host tests tests/app_adc. * App PAS fixes: * The pedal sensor filter setting is now applied. It selected a low-pass that was configured to pass the input through unchanged. * Cadence no longer loses accuracy as uptime grows. Pedal timing was taken as a difference of absolute float seconds. * The pedal sensor type setting is now read, and an unsupported value reports rather than decoding as if it were supported. * The torque control types report on hardware without a torque sensor instead of producing no output. * Selecting the torque type with the cadence timeout now samples the torque sensor. It previously only worked when entered by fall-through. * The pedal decoder and output ramp are reset when the app is reconfigured or restarted. * The PAS output is cleared while app output is disabled. In the combined ADC and PAS mode the throttle app kept applying the last PAS output. * The output ramp no longer takes one large step after a period in which it was skipped, and an iteration that computes no output no longer reapplies the previous one. * The COMM UART pads, which are the fallback when a board has no dedicated pedal sensor pins, are no longer reconfigured as inputs while UART communication is in use. * In the combined ADC and PAS app the PAS thread no longer resets the motor timeout. It kept the timeout alive after a script that had detached the throttle stopped sending overrides, so the throttle app never applied its timeout brake current. * A negative PAS Max Current, or a negative scaling handed over at runtime by another app, made pedalling apply braking current. The output ceiling is now clamped at zero, NaN included. * With the stop threshold set to derive (0), the derived stop period is capped at 1 s. It came from the start cadence and magnet count, so a low start cadence let assist run on for seconds after the cranks stopped (4.5 s at 2 rpm on 8 magnets). * The torque types' no-cadence interlock (a torque sensor stuck at a reading with the cranks still) cuts assist, after the ramp, instead of starting a fade over ramp_time_neg (up to 5 s). * The thread interval is no longer rounded up to whole milliseconds. At update rates whose period is not a whole millisecond the output ramp ran fast, three times too fast at 3 kHz. * Added the pas_status terminal command. * App PAS sensor support: * Single wire pedal sensors, in addition to quadrature. * Analog torque sensors on a configurable ADC channel, with a configurable zero point, scale in Nm/V, full scale and deadband. Previously a torque sensor needed a board specific implementation, which only one board has. * Crank torque is carried in Nm rather than as a ratio of full scale. * A torque sensor reading at or above the ADC reference is reported as saturated rather than appearing as a plateau in the assist. * An ADC channel the hardware does not provide is rejected. hw.h aliases the unavailable channels to the first one, so such a setting would otherwise read the throttle input. * Added the pas_torque terminal command, which reads the sensor and measures its zero point. * App PAS proportional power control: * New Proportional Power control type: motor power is a configurable multiple of rider power, where rider power is crank torque times cadence. Rider power was not a concept the app had. * Optional revolution synchronous torque averaging, over a configurable number of pedal pulses. Crank torque varies strongly within a pedal stroke, and averaging whole pulse intervals does not change character with cadence the way a time constant does. * The power request is converted to current against the measured input voltage, which is floored so that a low reading cannot inflate the request. * The previously unlisted fourth PAS control type is now named in VESC Tool. It behaves identically to Constant Torque. * App PAS limits: * Road speed taper: full assist below a start speed, falling linearly to nothing at an end speed. Setting the two equal gives a hard cutoff. * Power cap in watts, applied to every control type rather than only to Proportional Power. * Optional hard cut when the cranks stop, instead of ramping down over the negative ramp time. * Brake input on a configurable ADC channel with a threshold and optional inversion, which cuts assist immediately. The PAS app had no brake input at all, and in the combined ADC and PAS mode the two outputs are merged by taking the larger, so brake handling on the ADC side did not suppress PAS. * Added the pas_preset terminal command, with a pedelec preset. It prints what it would set and only writes when given store. * App PAS pedalling detection and assist cadence, following the Grin Cycle Analyst manuals: * Separate start and stop thresholds for pedalling detection, in seconds. These are tuned in opposite directions, so the single derived period the app used before could not serve both. Zero derives the old value, which for a low pole count sensor is a much longer cutoff than is wanted. * A cadence floor for the assist calculation in Proportional Power, defaulting to 55 rpm. Power is torque times cadence, which collapses as the cranks slow, so without a floor there is the least assist when pulling away from a standstill. * Reported rider power now uses the real cadence while the assist uses the floored one, so telemetry does not overstate what the rider is contributing. * App PAS telemetry: * New LispBM extensions: app-pas-get-torque, app-pas-get-torque-ratio, app-pas-torque-saturated, app-pas-get-rider-power, app-pas-get-assist-power, app-pas-get-assist-basis-power, app-pas-get-speed-taper, app-pas-get-output and app-pas-get-flags. The flags cover the conditions that otherwise look like the app doing nothing, such as a missing ADC channel, unclaimed pedal pins, the brake and the speed taper. * PAS cadence, torque, rider power, assist power, output and status flags added to COMM_GET_VALUES as mask bit 22, so VESC Tool can plot and log them. * app_pas_get_current_target_rel() now reports the output in both PAS modes. It was only written when PAS was not the primary output, so it read zero in the mode where PAS drives the motor. * App PAS throttle mixing and further Cycle Analyst behaviour: * Configurable mixing with a throttle: highest wins, which is what this firmware has always done, or throttle priority, which is what a Cycle Analyst does. * PAS output is now combined with the throttle for every current based ADC control type. It was only combined for the five brake types, so with ADC_CTRL_TYPE_CURRENT and the plain reverse types the PAS app ran and contributed nothing. * Optional requirement that the throttle only works while pedalling above a configured road speed, the Cycle Analyst MxThrotSpd behaviour. * Support for bipolar torque sensors, which rest mid range and swing both ways to measure the left and right pedal separately, such as a Thun. * A minimum rider power before the motor contributes anything, subtracted from the assist basis before the gain, as a Cycle Analyst applies its start level. * app_pas_stop() now clears the exported current target in both modes. It was only cleared when PAS was not the primary output, which matters now that the throttle app reads it for every current control type. * Added get-kill-sw, so the kill switch state can be read and not only set. * conf-set and conf-get reach ten more PAS parameters: the control type, pulses per revolution, both pedalling thresholds, the torque zero and scale, the assist gain, both taper speeds and the power cap. Only the current scaling was reachable before, so a script or a display could not adjust or report any of the rest. * Added get-aux, which reads back an auxiliary output. That is how a cooling fan switched by the Auxiliary Output Mode can be reported. Derived from the same pins the existing AUX_ON and AUX_OFF macros use, so it covers every board that drives aux as a plain GPIO. * App PAS closed loop power control: * Proportional Power can now trim its request against measured input power, which is what a Cycle Analyst does with its power PID. Open loop remains the default. * The open loop estimate is kept as a feedforward term and the gain only corrects the residual, so it can be small and the sluggish startup a Cycle Analyst gets from too low a power gain does not arise. * The loop only closes when PAS is the only thing driving. In the combined ADC and PAS app the measured power includes the throttle, which is not attributable to the PAS request. * Added app-pas-get-measured-power. * App PAS walk assist: * Walk assist, triggered either by a script through the new app-pas-walk-set extension (vesc.pas_walk_set in Lua) or by a switch on a configurable ADC channel. * A script request is a keepalive that expires after half a second, so a display that loses power or a script that stops while the button is held releases it rather than leaving the motor driving. * It replaces the normal PAS output rather than adding to it, bypasses the output ramp so releasing it stops the motor at once, has its own speed limit that it fades out against, and is overridden by the brake. * It drives with the cranks stopped, which is the point of it, so PAS Walk Requires Pedalling is there for anyone who would rather it did not. * The PAS status flags are now sixteen bits on the wire rather than eight, since the set no longer fits in eight. * The parameter descriptions now carry what the Grin Cycle Analyst manuals give for setting these by hand: how to determine the pulses per crank revolution, typical scales for bottom bracket and chain tension sensors, the bench procedure for measuring the scale with a known weight, and that a chain tension sensor's scale depends on chainring size. The pas_torque terminal command prints the same procedure. * App PAS sensor presets and script supplied sensors: * pas_preset takes a preset name, and the presets are composable: pedelec sets the limits (25 km/h, 250 W, a hard pedal stop and walk assist's 6 km/h), while erider and cyc describe a sensor, so applying a limit preset and a sensor preset keeps both. * erider configures an eRider GTL-T17-73 bottom bracket from its datasheet: quadrature at 18 pulses per revolution, 68.03 Nm/V and 102 Nm full scale. It does not set the torque ADC channel, and the zero still has to be measured, since the datasheet tolerance is larger than the default deadband. * cyc configures the CYC Motor analog torque sensor from CYC's published firmware: single wire cadence, a 1.55 V zero and 102.9 Nm at 3.30 V. If the zero is re-measured the scale has to be recomputed from it, and the command prints that arithmetic. It leaves the magnet count alone, since CYC's firmware has none to copy. * A script can supply the pedal sensor through app-pas-override (vesc.pas_override in Lua), giving cadence, torque sensor voltage, pulse count and brake state. This is for a sensor wired to another node on the bus, or a board whose pedal pins are the UART pads in use by a display. It is a keepalive with a 0.2 s window: when it lapses the cranks read as stopped and the brake as applied, and it does not fall back to the pins until turned off. Torque goes through the configured zero, scale and deadband, so sensor presets apply unchanged. * LispBM: bms-take-local lets a script's own BMS values (set-bms-val) count for the BMS limits -- cell temperature, state of charge, lowest and highest cell -- as a BMS on CAN does. A controller limited only on frames it received, so a script reading a BMS over the controller's own UART could show it in the BMS page but not protect the pack. Like a CAN BMS it lapses after 2 s without a refresh. * LispBM: pwm-set-freq changes the servo pin's PWM frequency without stopping it, keeping its duty, from about 1 Hz to 20 kHz; pwm-start stops at 31 Hz. It is what a speedometer driven by a pulse per motor turn needs at walking pace, as the Sur-Ron Light Bee's stock dash is (pkg surron_dash). The new frequency takes effect at the end of the current period, so no pulse is cut short, and 0 Hz holds the output low. * Lua script engine: * Lua 5.4 is available as an alternative to LispBM, chosen at build time with USE_LISPBM=0 USE_LUA=1. An STM32F4 has room for only one engine, so the two cannot be built together. Releases carry both builds, the Lua one as VESC_lua.bin beside each board's default. The two have different configuration signatures, so switching engines resets the motor and app configuration, which ESCargot Tool offers to restore. * It uses the same script container and COMM_LISP_* packets as LispBM, so upload, erase, run and stop, the REPL and the variable plots work from VESC Tool unchanged. The stats packet reports the measured engine stack use where LispBM sends zero. * The interpreter is the same one VESC Express runs. Scripts are sandboxed to the base, coroutine, string, table and math libraries, with a 20 KB memory ceiling. * Nested C calls are limited to a depth of 16. At Lua's default of 200, runaway recursion overflowed the thread stack and hardfaulted the controller before the check fired; it is now a catchable script error. * Callbacks for CAN frames, custom app data and a periodic timer, and vesc.systime and vesc.secs_since as a clock. * Motor bindings mirroring the LispBM extensions in names and units, with hyphens as underscores. Every setter refreshes the motor timeout, so a script that stalls lets the motor coast. Stopping a script does not command zero; the last command holds until the timeout expires. get_tacho and get_tacho_abs have no LispBM counterpart. * CAN bindings for the status of other controllers, discovery, remote commands and raw frames. can_msg_age returns nil for a controller never heard from, which is the only way to tell an absent controller from a stopped one, since the readers return 0 as LispBM does. Raw sends refuse an over-long payload or an out-of-range id rather than truncating. * Input bindings for the ADC, RC input, servo output and encoder, and calls to detach and override the ADC and PPM apps. get_adc returns nil for a channel the board does not have, where LispBM reads the first channel instead, which is usually the throttle. get_ppm_age reports how old the RC input is, since the decoder holds its last value when the transmitter goes away. * app_adc_detach and app_adc_override take the throttle and brake channels separately. * conf_get and conf_set reach every parameter the LispBM conf-get and conf-set do, generated from the LispBM tables so the two cannot drift. An unknown name returns nil, and parameters that need a full reconfigure are applied through one. * Bindings for every PAS accessor, the walk assist keepalive and the pedal sensor override, at parity with the LispBM extensions. * RMSG is answered with a refusal, since it has no Lua equivalent. * vesc.gpio_configure, gpio_write and gpio_read on the controller: the pins and the eight modes LispBM's gpio-configure takes, by the same names without the pin- prefix (the LispBM spellings are accepted too), so a script that switches a relay or reads a button can be written in Lua. * vesc.on_bms_cmd: VESC Tool's BMS commands (charge allowed, force balance and the rest) reach a script that plays the part of a BMS, as event-bms-* does in LispBM. Shared with VESC Express. * A package's settings, its page and its beeps: vesc.eeprom_store_i, eeprom_store_f, eeprom_read_i and eeprom_read_f, vesc.send_data, and vesc.foc_beep, foc_play_tone and foc_play_stop, as LispBM's eeprom-*, send-data and foc-* (script/lua_vesc_pkg.c). A slot is relative to the running package's settings range and checked against it, so one package cannot reach another's; code outside any package has the 256 custom slots, a slot out of range raises, and an unwritten slot reads nil. send_data sends a string as COMM_CUSTOM_APP_DATA on LispBM's interface numbers, up to 511 bytes, and vesc.on_app_data receives what the package's page sends. foc_beep keeps the firmware's refusal above 300 ERPM, and like foc_play_tone returns whether the motor took it; the tones leave the input timeout alone. foc-play-samples has no Lua binding. Host test tests/lua_pkg; tests/pas_parity checks them against LispBM's. * script/examples/bench_throttle.lua drives a motor on a bench from RC or a potentiometer: it starts disarmed, coasts and disarms on a stale input, rate limits upward and caps the current low. * Building with USE_LISPBM=0 works again. It failed on compilers that reject implicit declarations, such as GCC 15. * Crash reports: * COMM_GET_CRASH_REPORT (162) returns the stored crash diagnostics: boot count, reset flags, crash streak, supply dips, and either a halt reason or the fault registers. Reading does not clear, so a VESC Express collecting over CAN and a later VESC Tool session both see it; crash_diag clear is what forgets it. A report that did not survive is sent as zeros. * The firmware carries a GNU build id, included in the crash report, so a host can find the matching .elf for the symbols without being told which build it is. * crash_diag test faults on purpose so the report path can be checked on a board. It refuses while the motor is turning or while a report is already stored. * Packet ids 160 (COMM_HUB_PROVISION) and 161 (COMM_CRASH_DUMP) are reserved. This firmware only forwards them; VESC Express and VESC Tool implement them. * Hardware support: * CYC Motor X6 Pro, X6 Stealth, X12, Photon and Photon 2 (cyc_x6_pro, cyc_x6_stealth, cyc_x12, cyc_photon, cyc_photon2), taken from CYC's published board headers, which are the 75_300 with a different analog front end. The X12 and Photon current gains follow CYC's shipping images rather than their published headers, which read current 4.7 % and 8 % high. * The Photon 2 has no published source and is reverse engineered from CYC's binaries. Its limits and thermistor divider are inherited from the Photon. * None of the CYC boards has been run on a unit, and they are not in the release set. Check the current reading before riding, since their 3.30 V reference differs from the 3.44 V usual in this tree. * disco_ihm08m1: an STM32F407 Discovery wired by jumpers to ST's X-NUCLEO-IHM08M1 power stage (three L6398 drivers, 10 mOhm low-side shunts, 8 to 48 V), a bench for induction and OEM motors with fine current sensing. Every wire is listed in its header. Not in the release set. * unity: its LispBM build has no pedal-assist app, which does not fit beside LispBM, the audio stream and the startup tune in its app partition; choosing the PAS app does nothing there. Its Lua build has all of them. * Maxim: its LispBM build leaves the pedal-assist app out, as unity's does (the Lua build keeps it). It had 20 bytes of app flash left, and the release could not build it. maxim_100 now has a Lua-engine build, with its DC/DC rail readings as vesc.hw_reg_v, hw_reg_i, hw_reg_t and hw_reg5_v. * The SWD programmer leaves out its STM32H7 and STM32L0/L1 drivers on the Ubox 100 V, Flipsky 6.0, Stormcore 100S and VESC GP builds (HW_SWD_NO_H7_L0), about 6.3 kB, which is what lets gesture cruise control and several packages per board fit there. nRF51/52 remotes and STM32F1, F4 and L4 targets (VESC BMS) are still programmed; an H7 or L0/L1 is recognised and named "(not in this build)" rather than failing as an unknown target. The same goes for 155 more boards whose firmware no longer fit their flash, and 6 of them also leave gesture cruise control out (HW_NO_GESTURE_CRUISE, about 1.7 kB); make/flash-trim.mk lists them. 17 boards still do not fit, by 7.8 to 13 kB: luna_m600 (three variants) and luna_bbshd, the dual Stormcores, axiom, duet_xs100 and duet_xs60. An H7 or L0/L1 chip is programmed with any SWD probe as before. * Release firmware: * The release ships prebuilt firmware for ten boards, plus the no limits variant of seven of them and a Lua-engine build of all ten: ubox_single_85_200, fsesc_75_200_alu, 75_100, 75_100_V2, 75_300_r2, maxim_100, Lightning400, unity, stormcore_100s and flipsky_60. flipsky_60 (the Mini FSESC6.7 Pro) is built because a rider asked for it and is not tested here. Other boards build from source. * From upstream VESC (merged October 2026): * LispBM: pkt-enc, pkt-dec-alloc and pkt-dec encode and decode VESC packet framing in a script. comm/packet.c can copy each decoded payload to a buffer for this. Lua also has vesc.app_adc_range_ok, as app-adc-range-ok. Host test tests/pas_parity. * pkt-dec differs from upstream's in three ways. The decoder state is an opaque value rather than a byte array a script could overwrite, including a function pointer the decoder calls. Each decoder is independent: upstream shared state between them, so after an out-of-memory error one decoder could skip its input and return another's bytes. And when one chunk completes several packets, each is returned in turn rather than only the last. * conf-set and conf-get reach l-battery-regen-cut-start and l-battery-regen-cut-end, in LispBM and, through the generated parameter table, in Lua. * Native libraries: set_cfg_float with CFG_PARAM_foc_motor_l wrote the motor resistance instead of the inductance. The FOC loop reads the resistance live. * IMU: the Madgwick filter no longer turns its attitude into NaN when its estimate already agrees with the accelerometer exactly, which is the state of a board seeded level and held still. Every later roll and pitch was NaN. * IMU: the software I2C sample rate is limited to 900 Hz on every bus speed, after spurious controller resets at 1200 Hz. * Thor301 and Lightning400: the boot beep is switched off from a timer instead of blocking boot, and the Thor301's second beep is gone. * The LispBM interpreter is updated to upstream c47652b6. * From upstream VESC (merged 28 October 2026): * IMU: the attitude is seeded with yaw 0 when there is no magnetometer. It was seeded at -90 degrees, so a board booted believing it faced sideways. * IMU: the sensor is given time to settle after it is configured, the accelerometer filters start from the sample the attitude is seeded from instead of from zero, and the AHRS start-up window is timed from the seed. The LSM6DSV32X accelerometer uses fast settling. * AS5x47U encoder: the position is requested after an error register read, rather than the sequence falling through to an error. * USB connects without the 1.5 second delay it had. * 60_100 hardware. Thor301, Thor400 and Lightning400 ignore the button press that powers them on. * The LispBM interpreter is updated to upstream 3428efd9. * From upstream VESC (merged 1 November 2026): * IMU: the sampling loop keeps a fixed deadline rather than sleeping a fixed time after each sample, rounds its period down to whole ticks and reports the rate it really runs at. Before, it slept a tick short of the period, so at 1 kHz it ran at 1111 Hz while the filters were set up for 1000, and every IMU filter cutoff was 11 % off (tests/imu_timing). A sample rate of 0 leaves the IMU off. The first sample after the thread starts gets a nominal time step. * IMU: the accelerometer magnitude is filtered at a fixed cutoff frequency, so the filter no longer changes with the sample rate, and the LSM6DSV32X accelerometer filters are set to fixed targets. * BM60 and BM75 hardware, and the Z500 variant of the Lightning400, from upstream's 7.00 release branch. * From upstream VESC (merged 9 November 2026): * BMS limits on dual-motor hardware use each motor's own BMS settings, and limits set from a script (conf-set) take effect without a reboot. Before, the settings were copied once at boot. * Sin/cos encoder: the delay compensation uses the FOC speed, whose sign is right when the motor direction is inverted. * AMT22 encoder: initialising it clears only its own state. * From upstream VESC (merged 24 November 2026): * Redundant throttle in the ADC app (App Settings > ADC > General, Redundant Throttle Max Diff; 'adc-redundant-throttle-diff in conf-get and conf-set, Lua too), off by default. Above 0, ADC2 is a second sensor on the throttle rather than a brake: each is mapped to 0..1 of its own travel after its filter, with its own inversion, and the two are compared on every sample. ESCargot's differs from upstream's in what a fault does. Upstream stops PWM (mc_interface_fault_stop with FAULT_CODE_THROTTLE_RANGE) when the two differ by more than the setting and whenever the throttle is out of its range, so the motor freewheels and regen braking is gone. Here the motor stays under control: a mismatch holds the output at zero with the timeout brake current, as an out-of-range throttle already does, and the throttle drives again only once both sensors agree with it released for 0.5 s. FAULT_CODE_THROTTLE_RANGE goes into the fault list (the faults terminal command, ESCargot Tool's health page) once per event, for a mismatch and for an out-of-range throttle alike, with both voltages, and without stopping PWM; app-adc-range-ok is false during a mismatch. With it on, nothing reads ADC2 as a brake: not the ADC2 brake control types, the cut of the throttle while braking, safe start after brake, the hold at full brake, the hill hold or gesture cruise, and a PAS brake, torque sensor or walk switch set to ADC2 is ignored and reported as a channel the board does not have (BRAKE_CH_INVALID, TORQUE_CH_INVALID, WALK_CH_INVALID in app-pas-get-flags), so the second throttle gives no torque assist and no walk assist. To make room for it, ubox_single_85_200, stormcore_100s, flipsky_60, fsesc_75_200_alu, 75_100 and 75_100_V2 (and their _no_limits) leave the check out (HW_NO_REDUNDANT_THROTTLE, make/flash-trim.mk), with both engines: there the setting does nothing and ADC2 stays a brake. ubox_single_85_200, stormcore_100s and flipsky_60 (and their _no_limits) were still short of flash and also leave out the hold at full brake and the hill hold (HW_NO_BRAKE_HOLD, as gp already did), with both engines; their settings stay and do nothing. ESCargot Tool greys out what a board leaves out, told by a byte COMM_GET_DECODED_ADC now appends (bit 0: the redundant throttle check, bit 1: the hold at full brake and hill hold). The fault logging stays on every board. Host tests tests/app_adc, tests/throttle_guard and tests/app_pas. * app-adc-override-dec (Lua vesc.app_adc_override_dec(thr, brake)) sets the decoded throttle and brake (0 to 1, -1 for off) from a script, which with a redundant throttle is how a brake comes in. Unlike upstream's, it refreshes the ADC app's input timeout like app-adc-override, and while either value is set the app no longer refreshes it itself, so a script that sets a throttle and stops is an input lost rather than a throttle held for ever. Lua also has vesc.app_adc_range_ok, as app-adc-range-ok. Host test tests/pas_parity. * The script area's blank check reads every byte. It read the first byte 131072 times, so an area whose first byte was blank and whose rest was not was taken as empty and its erase skipped. An upstream bug. * A script told an EEPROM value was stored now means it. eeprom-store-i and eeprom-store-f returned true when the motors did not release within 3 s and nothing was written (upstream issue 939), and every flash write that could not start left the throttle ignored for 5 s; firmware and script-area writes also left the flash unlocked. A write that cannot start now returns false and gives the input back at once. An upstream bug. * Boards without a shutdown switch no longer store their odometer to flash while the wheel turns. The store came after 3 minutes with no motor command, which coasting down a long hill also is, and it releases the motor and ignores input while it writes (upstream issue 882). It now waits until the motor is below 200 ERPM, and a store that fails is tried again. Generic shutdown handling and the Spintend Ubox boards. An upstream bug. * Position Angle Division 0 no longer hangs the controller. The position code divided by it, and the angle normalising in the FOC interrupt never returned for the infinite result (upstream issues 930 and 409). A value that is not positive is taken as 1, and the normalising returns for any input, unchanged within a turn of its range. An upstream bug. * Spintend Ubox boards refuse a firmware update while the power key is momentary, or not yet known in the first two seconds after power-up. With a momentary button nothing holds the regulator on while the bootloader copies the new firmware in, and the board was bricked (upstream PR 881, which this follows). The refusal says why in the terminal and in ESCargot Tool, and the new power_key terminal command shows what the board detected. A latching switch or power from another source is unaffected. * LispBM: str-from-n prints 64-bit and unsigned integers whole. With no format it took every integer's low 32 bits as signed, so (str-from-n 123456789012i64) gave "-1097262572" and a u32 above 2^31 came out negative. An upstream LispBM bug. * LispBM: a script stopped from VESC Tool stays stopped. Reading its statistics, which the Tool does while the script page is open, restarted it. Upstream fixed this in VESC Express only. * LispBM: a request that could not pause the scripts no longer stops them later. Stopping them from VESC Tool, a stream upload, and the REPL's expressions and :pause, :undef, :env and :symbols each wait a second or two for the evaluator to pause; a script inside a slow extension does not get there in time, and the request gave up with its pause still pending, so every script stopped the moment the extension returned, with nothing saying why. A request that gives up now cancels its pause and says "Could not pause". A REPL expression or stream upload with no LispBM memory to start it resumed nothing either, and the failed stream left the next one failing "Reader not closing". :env and :symbols, which only read, no longer leave a running evaluator paused. Upstream fixed the REPL expression path in VESC Express only; ESCargot's Express firmware has the rest of the fix. * A firmware update no longer fails because a script was restarted during it. The new firmware is staged in the flash sectors that also hold the scripts and LispBM's image, and a REPL command arriving while an upload had stopped LispBM -- a VESC Express script polling the controller sends one -- started it again; it wrote its image over the staged firmware, the bootloader found the copy damaged and kept the old firmware, while VESC Tool reported the upload fine. From the staging erase until 30 s after the last write, LispBM and Lua now refuse to restart ("A firmware update is in progress") and the script areas refuse writes. An upstream bug. * CAN: a multi-frame packet no longer goes into the buffer of one abandoned mid-way. Frames carry only an offset, so a packet fills whichever buffer is already filled up to it, and the first such buffer was taken. The controller loses frames while it erases or writes flash, and a packet arriving then stays in its buffer at that offset; the next packet to reach it was filled into that buffer and failed its CRC. During a firmware update with an Express polling the controller, 3 to 5 chunks per update went unanswered and were sent again after 3 s; with this, none. Of the buffers at an offset the one filled most recently is taken, and a packet starting with every buffer busy takes the one untouched longest. An upstream bug. * Development: * tests/check.sh runs every check that needs no hardware in one command, inside the flake dev shell that pins the tools, and CI runs exactly that. It discovers host test suites rather than listing them, which is how an upstream test that arrived in a merge got run. * Host tests for app_pas compile the shipping source, with sanitizers, coverage, a property fuzzer, cppcheck and clang-tidy. Input current limit and IMU freeze detection logic moved into util/mc_limits.c and util/imu_freeze.c unchanged so they could be tested, with a CBMC proof that the IMU detector extraction preserved behaviour. * The Lua engine, the LispBM engine and the Garmr packages run on a simulated STM32F405 in QEMU against the real ChibiOS kernel. tests/vescsim serves the VESC protocol over TCP with no controller, for testing VESC Tool. * Checks that the configuration signatures and confgenerator agree with the VESC Tool parameter XML, that the Lua and LispBM PAS bindings stay level, that the CYC board values match CYC's sources, and that each release board builds and is packaged. * Tests for the upstream changes that arrived without one: the Madgwick zero-gradient case, packet.c's payload capture, and a check that every native library configuration getter and setter reads and writes the field its parameter names, which catches the foc_motor_l class of bug that a round trip cannot. * A software resolver decoder (encoder/resolver.c) for the resolvers on OEM traction motors such as the Prius MG1/MG2 and the Leaf: synchronous demodulation of the winding samples and a type-II tracking observer, the loop a resolver-to-digital chip runs, with no steady lag at constant speed and speed as well as angle. Host-tested against simulated windings past a Prius MG2's top speed; no board feeds it yet. * MERGING.md and tests/setup-fork.sh make merging upstream a fixed procedure, and a provenance audit in CI checks that file headers credit who wrote the code in them. * hwconf/board_functions.py lists a board's functions (ADC1-4, UART, PPM, PAS, halls, SPI encoder, I2C, CAN) with the chip pin each is on and which share one, from the macros the build's own preprocessor sees (make hwmacros_), plus pins a board reads in its C file. hwconf/connectors/.json adds which connector pin each reaches, so far for the Ubox 85/250 V2, as its owner read it off the board. * tests/lispif_stats runs the real lispif.c and LispBM evaluator on the host, and checks that reading a stopped script's statistics leaves it stopped. * tests/lispif_pause does the same with the evaluator held in a slow extension, and checks that every request that pauses it lets the script go on after a timeout or a failure. ### 7.01 #### TBD * Major IMU refactor, IMU DRDY support. See https://github.com/vedderb/bldc/pull/917 * MT6835 encoder support: https://github.com/vedderb/bldc/pull/916 * New kill switch modes. * Added crash_diag terminal command: https://github.com/vedderb/bldc/pull/877 * LispBM: * Improve stability when not using the image system * Many new extensions and access to more configuration parameters. * Added PWM + ABI Inverted encoder mode. * App ADC coasting brake support. * App ADC reduntant dual throttle support. ### 7.00 #### 2026-05-15 * Configurable HFI reset ERPM. * Removed D axis gain scaling parameters. * Sin/Cos encoder filter delay compensation. * Moved field weakening to fast loop for better stability. * New AB encoder sensor mode for encoders without index pulse. * Added MA782 encoder support. See https://github.com/vedderb/bldc/pull/886 * Added AMT22 encoder support. * LispBM * Performance improvements and bug fixes * AS5047 encoder pin remapping support * Hall sensor pin remapping support * Many new extensions and configuration parameters * VESC Remote coasting brake support. * Use highest value of field weakening and MTPA current instead of summing both. * Add FOC option to leave voltage headroom for Vq under full modulation. * Added new fault codes that can be enabled or disabled: * Encoder slip * Overspeed * Underspeed * Absolute overspeed * Added field weakening backoff gain parameter. * SPI-support for LSM6DS3 IMU ### 6.06.6 #### 2025-11-01 * Persistent CAN ID and CAN Baud across firmware updates. * Better current controller circle limiting. ### 6.06 #### 2025-08-18 * LispBM: * New core extansions, optimization and much more unit testing. * Many bug fixes in the reader. * Moved const memory into its own flash sector. * Added const-heap-erase extension. * Added mutex support. * Added can-ping extension. * LBM Image support * Super fast boot possible * Much easier to use const blocks * Rebuild image and const data when needed * Added conf-detect-lambda-enc. * Added many configuration parameters. * New offset calibration modes and options. * Automatic offset calibration support. * Added HFI ambiguity resolution modes using id injection. * Support for coordinated CAN baudrate update. * Overmodulation support. * Added PWM and PWM+ABI encoder modes. * Detect encoder parameters during flux linkage detection. ### 6.05 #### 2024-08-19 * LispBM: * Support for var in progn. * Support for curly brackets instead of progn. * Added set and setq. * Added defunret. * Added support for detaching only one of the ADCs. * Added set-encoder. * Support for moving code and data to flash. * Incremental read of uploaded code. * Removed array types other than byte arrays. * Added more position extensions. * Use timeout when app_adc is detached. * Added extension conf-restore-mc. * Added extension conf-restore-app. * Added extension conf-dc-cal. * Added access to several config parameters. * Many improvements and bug fixes. * Better error descriptions. * Added thread profiler. * Added flat value support. * Added recv-to with a timeout argument. * Added remote message extensions. * Added phase-hall extension. * Added loopwhile-thd. * Added can-recv-sid. * Added can-recv-eid. * Added app-adc-range-ok. * Much faster return on error for i2c-tx-rx. * Added shutdown-hold. * Added crc32. * Support for only polling variables starting with VT. * Added rand. * Built-in sort function that is much faster and can sort much larger lists. * Added foc-play-tone and foc-play-stop. * Added foc-play-samples. * Added can-msg-age. * Massive performance boost for string functions and 64-bit operations due to much faster memory allocation. * Hall sensors improvements: * Smooth transition to sensorless. * Bug fix in interpolation. * Use less noisy speed estimator for interpolation. * Adjusted rate limit. * Added soft regen cutoff. See https://github.com/vedderb/vesc_tool/pull/310 * Attempt at limiting the input current when using MTPA and field weakening. * Removed built-in balance app. The balance-package can be used instead, which is where new development is done. * Added option to select PID-controller speed source. * Try to make odometer persistent even without shutdown switch. See https://github.com/vedderb/bldc/pull/624 * Dual motor flux linkage measurement current spike bug fix. * Fix possible runaway after faults during openloop measurements (flux linkage, encoder). * Added more current sampling modes. * Added FOC interpolation mode. * Allow passive flux linkage measurement. * Fixed some braking glitches. * Configurable HFI error truncation to reject noise. * Removed GPDrive. * FOC: Option to short phases on 0 duty. * FOC: Added MXV observer. ### 6.02 #### 2023-03-12 * LispBM: * Bug fixes. * Added floor, ceil, round. * Added resistance, inductance and flux linkage estimator functions. * Added adc_ctrl_type setting. * Added app_is_disabled. * Added ICU-driver. * Inductance measurement support. * Rewrite of the event system. * Added canget-vin * Added hw-type sysinfo. * Added crc16-extension. * IMU filtering changes and new defaults. * Increased hall sensor switch hysteresis. * Added and updated hardware configs. * Systime overflow fix. * Some can-command fixes. --- ### 6.00 #### Released 2022-12-08 * Added stack checks. * Release motor fix when cc_min_current is 0. * Added support for NTC and PTC temperature sensors with custom resistance and base temperature. * Added sandboxed lisp scripting using https://github.com/svenssonjoel/lispBM. * Encoder driver split and rewrite to make it easier to support more encoders. * Flash writes now work on lower MCU voltages too. * Added fwinfo terminal command. * CAN status messages are now configured using bitfields. * There are two rates at which CAN status messages can be sent now. * New silent HFI mode with much better performance at high load. * Added app ADC min and max voltage limits for throttle fault detection. * Another new silent HFI mode that is less sensitive to getting the inductance correct. * Added openloop current boost parameter. * Added openloop current max parameter. * Added support for dynamic loading of C libraries. * Added more observers: * mxlemming * ortega with flux linkage tracking * mxlemming with flux linkage tracking * AS5x47 encoder support: https://github.com/vedderb/bldc/pull/511 * Disable BMS limit options. * Added PT1000 temperature sensor support. * APP ADC button bitfield and CC disable support. * BissC encoder support: https://github.com/vedderb/bldc/pull/536 * Better detection failt handling and reporting: https://github.com/vedderb/bldc/pull/533 * TLE5012-support: https://github.com/vedderb/bldc/pull/551 --- ### 5.03 #### Released 2022-01-16 * Fixed inductance measurement bug. * Speed tracker windup protection. * Phase filter support. * Phase voltage offset calibration. * Better current offset calibration. * Added power switch commands. * Synchronize observer state when running in open loop. * Force oberver state magnitude above 50% of flux linkage. This prevents the motor from getting stuck and 'screaming'. * Observer global convergence update. Helps tracking the motor through 0 speed. * Added HFI start sensor mode. * Added TEMP_SENSOR_KTY84_130. * Major UAVCAN update. See: https://github.com/vedderb/bldc/pull/269 * Avoid numerical instability when mapping is done over a narrow range. See: https://github.com/vedderb/bldc/issues/262 * App Balance updates. * Added servo_out_enable appconf option, so that the PPM port can be used to control servos with the default firmware. * Better current controller windup protection. * Field weakening support (experimental, be careful and use at your own risk). * Use filtered current for axis decoupling. * Odometer is now persistent after firmware updates. * Added hw runtime counter (see hw_status in terminal) * Added custom UI support. * Limit hall sensor angle rate of change based on ERPM. * Added p_pid_gain_dec_angle parameter. * Low pass filter input voltage. * Dual hardware CAN-scan fix. * Dynamic QML-script write support. * Use fast speed tracker for current controller. * Disable motor for 5 seconds after flash operations. * Added kill switch support. * Added process derivative term to position controller. * Added position PID-controller angle offset. * Configurable PID controller rate. * Added several AUX port modes. * Added configurable safe start modes. * Added fusion IMU filter. * Added constant torque PAS mode. * Correct scaling for resistance and inductance. * Fixed inductance measurement bug with f_sw > 30k. * Corrected inductance measurement algorithm. * Fixed max power loss calculation. * Better input current estimation. * Added raw sampled data mode. * Compensate inductance for motor saliency in observer. * Added MTPA mode based on measured current. * Faster overvoltage protection. * Added statistics counters. * Added configurable observer offset. --- ### 5.02 #### Released 2021-01-11 * IMU calibration improvement. * Added COMM_GET_MCCONF_TEMP command. * Added bidirectional current command to VESC remote. * Fixed motor temperature reading on hw with ADC mux. * Added speed PID input ramping option. * Added LSM6DS3 IMU support. * Added MTPA support. See See: https://github.com/vedderb/bldc/pull/179 * Added HW_HD75 support. * NRF52 UICR write fix. * App PPM rework. See https://github.com/vedderb/bldc/pull/192 * Added bm_reset terminal command. * Added bm support for STM32F30x and STM32L47x. * App Balance updates. See https://github.com/vedderb/bldc/pull/193 * Motor current now based on magnitude of both axes. * Initial VESC BMS support. * Hall sensor interpolation improvement. * Made hall sensor filter configurable. * Added locking time and ramp up time parameters to sensorless startup. * Removed D axis current injection. * Initial VESC IO-board support. * Added hall sensor interpolation ERPM config option. * Use fast speed estimator for RPM limit. * Avoid accumulated rounding error when using PID position angle division. * Added UAVCAN raw throttle drive mode (current or duty cycle control). * Added MT6816 encoder support. See https://github.com/vedderb/bldc/pull/238 * Added modulation-based D axis current controller gain scaling. Addresses https://github.com/vedderb/bldc/pull/220 * Added PAS app. See: https://github.com/vedderb/bldc/pull/243 * Added 100k CAN-baudrate. * Added 100k NTC temperature sensor support. --- ### 5.01 #### Released 2020-04-27 * Fixed PPM bug in previous release. --- ### 5.00 #### Released 2020-04-27 * Dual motor support. VESC-based controllers such as the focbox unity will now work. * Fixed bug in cross BEMF decoupling. * Disable CC decoupling during flux linkage measurement. * Balance app updates. See: https://github.com/vedderb/bldc/pull/141 * Observer gain calculation update. * Better observer gain scaling. This has a large impact on some motors. * Added test build flag, that is transmitted with the FW Version command. * Detect all bug fix. * Added COMM_SET_BATTERY_CUT command. * Added CAN_PACKET_SHUTDOWN CAN-command. * GPDRIVE output sample fix. * Some ISR optimization. * Updated ChibiOS to version 3.0.5. * Increased USB thread priority to avoid freeze during connect/disconnect on windows. * Smooth current ramping during resistance measurement. * Moved fault stop to thread, and added SPI mutexes to DRV drivers. * Smooth current ramping in flux linkage measurement and sensor detection. * Added hall_analyze terminal command. * Motor temperature filtering bug fix. * Inductance measurement scaling fix. * Better flux linkage measurement. * Improved battery level and range estimation. * Use fast speed estimator for encoder sensorless transition. * Signigicantly improved hall sensor transitions and interpolation. * More filtering on the motor temperature. * Added IMU orientation calibration support: https://github.com/vedderb/bldc/pull/158 * Added mcconf_l_duty_start so that the current can be limited smoothly when reaching max speed. * Allow throttle in opposite direction even after passing speed limit for PPM and VESC Remote apps. --- ### 4.02 #### Released 2020-03-06 * Position PID fix (most notable on multiturn encoders). * App balance updates. See https://github.com/vedderb/bldc/pull/138. * Changed FOC time constant back to 1000 us. * Do not count AS5047 all ones as fault. * Improved axis decoupling and integrator windup protection. Should prevent wobbles. --- ### 4.01 #### Released 2020-02-01 * Leave debug mode on NRF5x after disconnect to avoid excess power consumption before power cycle. * Added encoder_clear_errors and encoder_clear_multiturn terminal commands. * Initialize current offsets to 2048 to avoid a fault code to be logged at boot. * Added 10K, 20K, 50K and 75K CAN baud rates. * Added very basic TS5700N8501 multiturn mode. --- ### 4.00 #### Released 2020-01-28 * Added support for HFI to track motor position at 0 speed without sensors. This is the main new feature of FW 4. * Fixed CAN-bug in VESC Remote. * Reset current integrator when leaving duty cycle control mode. Fixes braking issue https://github.com/vedderb/bldc/issues/125. * More accurate and faster inductance measurement. * Ability to measyre ld - lq. Useful for MTPA in future firmwares. * Reset shutdown when uploading FW data. * Added CAN-bride and COMM_CAN_FWD_FRAME. * Added CAN_PACKET_POLL_TS5700N8501_STATUS to poll most relevant data last received from the TS5700N8501 encoder. * Added TS57N8501 ABM, SF and ALMC to encoder terminal command. --- ### 3.66 #### Released 2020-01-12 * Added support for HW 100/250. * Added uptime terminal command. * Added some delays to DRV8323s SPI driver. * Added SWD support for NRF52840 with idcode 0x015B. * TODO: Have a look at https://github.com/blacksphere/blackmagic/commit/302ff20a6d5b806c09e0ca7e996beab3ef3596f4. * Fixed INVERTED_SHUNT_POLARITY for BLDC. * Added decoupling to FOC current controller. * Better motor tracking at high ERPM and low Fsw. * Made uart and permanent uart more independent. * Do not write to USB if cable has not been connected. * Added timeout to USB write. * Better FOC current control integrator windup protection. * Added FOC observer type selection options. * Print TS5700N8501 position in encoder terminal command. --- ### 3.65 #### Released 2019-12-22 * Added support for PTC motor temperature sensor (e.g. KTY84) * APP_PPM sleep fix. Should solve CAN issues. --- ### 3.64 #### Released 2019-12-19 * Added support for HW60_MK3 * Disable shutdown sampling when the watchdog runs slowly. * Added COMM_SET_CURRENT_REL. * Added support for boot/ok signal. * Added unused mode for aux port. * Fixed positive ramping time setting. * Changed PPM timeout handling. * IRQ priority fix: SYSTICK < UART < MCPWM. Possibly related to http://www.chibios.com/forum/viewtopic.php?f=3&t=4665. --- ### 3.63 #### Released 2019-12-05 * NRF remote power meter is now unaffected by temperature decrease and speed limits. * Added LZO compression support to firmware upload, making firmware updates 30% - 50% faster. * Added LZO compression support to SWD upload. * Made serial interrupts priority higher than PWM so that higher speed UART is possible. * Added support for TS5700N8501 encoder (via COMM port). * Better observer gain calculation. --- ### 3.62 #### Released 2019-09-27 * Added COMM_BM_MEM_READ. * Merged EUC app (experimental). * Fixed NRF remote reverse bug. * Do not stop FOC on configuration updates if not needed. --- ### 3.61 #### Released 2019-09-09 * Added PPM_CTRL_TYPE_CURRENT_SMART_REV mode. --- ### 3.60 #### Released 2019-09-08 * Fixed IMU9x50 bug. * Unrigester ICM20948 terminal callbacks when unused. * Added experiment plot functions. * Added D and Q axis voltage to RT data. * Added smart reverse function to nunchuk app. --- ### 3.59 #### Released 2019-09-03 * Added more data to MOTE_PACKET_ALIVE. * Added app template. * Added function to unregister terminal callbacks. * Added BMI160 support. * Added support for the VESC HD. * Added support for SWD programming permanent NRF. * Encoder SW SPI fix. * Slightly faster boot. * Moved custom HW and APP configurations to conf_general.h. * Added support for passing HW and APP default configuration as make arguments. * Added SW shutdown support. * Added command to erase bootloader. * Added function to stop IMU threads, so that IMUs can be switched during runtime. * Only generate encoder fault when the ERPM is low enough to use the encoder. * Added many IMU and AHRS settings to appconf. * Re-initialize IMU when appconf is written. * Added imu_gyro_info terminal command. --- ### 3.58 #### Released 2019-07-01 * Set motor to FOC mode after successful FOC detection instead of the default type for the hardware. * APP_ADC: Do not send brake command over CAN if config.multi_esc is not set. * APP_PPM: Make pulses invalid if they are above 150 % instead of 120 %. * Introduced a new control mode that allows reverse with hysteria (@ackmaniac port) --- ### 3.57 #### Released 2019-05-16 * Added CAN status message 5 with input voltage and tachometer data. * Fix github issue https://github.com/vedderb/bldc/issues/94. * Use default F_SW for HW after autodetect FOC. --- ### 3.56 #### Released 2019-05-03 * Fixed current offset fault bug in non-FOC mode. * Multiple IMU support. * Added support for the ICM-20948 IMU. * Decreased ERPM cut in open loop flux linkage measurement. --- ### 3.55 #### Released 2019-04-26 * Initial sin/cos encoder support. * New ADC control mode. * Virtual motor support. * Disable chuk cruise control on dropouts. * Fix multiple VESCs over CAN duty cycle mode. * Added boot and runtime flash memory CRC integrity check. * Updated chuk RPM filter and moved it to the beginning of the output thread. * Decreased chuk output thread rate from 1 kHz to 200 Hz. * Added mpu_read_reg terminal command. * Fixed DRV8301 fault readout bug. * Added unbalanced current detection. * Added high current offset detection. --- ### 3.54 #### Released 2019-03-31 * Added mcpwm_foc_set_openloop_duty and mcpwm_foc_set_openloop_duty_phase. * Added blackmagic probe SWD output to program other MCUs. * Can be used to flash bricked VESCs from a working one. * Can be used to make a custom NRF5x module. --- ### 3.53 #### Released 2019-03-20 * Limit foc_current_filter_const range to prevent damage due to bad configuration. * Set default NRF speed to 1 Mbit/s. * Use lower switching frequency when detecting resistance to reduce deat-time distortion. * Don't enable temperature compensation in auto detection by default. --- ### 3.52 #### Released 2019-03-10 * Added support for second revision of HW75/300 with separate UART for NRF51. * Added COMM_TERMINAL_CMD_SYNC, which does not drop commands when busy. * Added option to disable permanent UART. * Moved TIM5 to own file, and use it from other places. * Removed need for TIM2 in mcpwm. * Added utilization percentage to threads terminal command. * Added IMU interface. * Added support for the MPU9150 and MPU9250. * Added COMM_GET_IMU_DATA. --- ### 3.51 #### Released 2019-03-04 * Fixed AS5047 error rate bug at position 0. * Increased threshold for AS5047 fault to 5 %. * Set correct V_REG value for HW 75/300. * Better command processing. * Proper scaling when setting relative currents and acceleration and braking currents are different. --- ### 3.50 #### Released 2019-03-01 * AS5047 parity check and fault code on error rates > 1 %. * Signature on mc and app configuration. * FOC loop frequency truncation on all hardwares. --- ### 3.49 #### Released 2019-03-01 * New watchdog implementation. * HW updates. * Fixed DC motor current sampling issue. * Deadtime in nanoseconds instead of register value. * Use fastest ramping time when throttle is applied. --- ### 3.48 #### Released 2019-02-18 * Added pairing flag to appconf. * Decreased CAN TX timeout. --- ### 3.47 #### No official release * Current percentage limits. * Mcconf_temp based on current scale instead of absolute current. * Removed battery current from mcconf_temp. * Added current scale parameter. * Different braking behavior: prefer cogging over locking the brakes. --- ### 3.46 #### No official release * DC motor RPM measurement and RPM control when using encoder. * Support for configurable current low pass filter. * Much better recovery when failing to decode packets. * Run all detect functions in separate thread. * Fixed bug introduced when adding support for dual UARTs. * Added support for reverse state on NRF remote. * Support to disable app output for a specified time. --- ### 3.45 #### No official release * Default CAN ID from UUID, and hook to define it in hwconf. * CAN ping support. * Simultaneous firmware update over CAN-bus. * Fully automated motor detection, based on maximum motor power losses. * Sensor autodetection and configuration support. * Softer encoder detection. * Better NRF_EXT support. * New more reliable flux linkage measurement. * Simpler to add hardware versions to build system. * More DAS hardware support. * DRV8323s support. * Initial UAVCAN support. * Moved from uart to serial driver to avoid DMA conflicts. * Support for permanent UART. --- ### 3.44 #### No official release * NRF_EXT commands support. * Use NRF51822 with ESB remotes. * Different radio channel for NRF pairing. --- ### 3.43 #### No official release * Added battery ah to setup info. * Changed tacho values in COMM_GET_VALUES_SETUP to meters. * Added battery wh COMM_GET_VALUES_SETUP. * Better remaining battery capacity calculation. --- ### 3.42 #### No official release * Added setup info parameters: * Motor Poles * Gear Ratio * Wheel Diameter * Battery Type * Battery Cells * Added more CAN status messages. * Updated speed PID to start properly when braking is disabled. * Added COMM_GET_VALUES_SETUP. * Added COMM_SET_MCCONF_TEMP. * Added COMM_SET_MCCONF_TEMP_SETUP. * Added COMM_GET_VALUES_SELECTIVE. * Added COMM_GET_VALUES_SETUP_SELECTIVE. --- ### 3.41 #### No official release * First general purpose DC output implementation. --- ### 3.40 #### Released 2018-07-23 * Added motor controller ID to COMM_GET_VALUES. --- ### 3.39 #### Released 2018-07-06 * Updated HW75_300. * Added AUX output support. --- ### 3.38 #### Released 2018-04-22 * Fixed temperature limit bug when the acceleration and brake current limits are different in magnitude. --- ### 3.37 #### Released 2018-03-24 * Temperature compensation on KI in addition to the observer resistance. * Configurable FOC current filter (useful for slow abs max current setting). --- ### 3.36 #### No official release * Added handbrake current commands to the simple CAN interface. * Added D-term filter to position and speed controllers. --- ### 3.35 #### Released 2018-02-17 * Added option to disable nRF transmission (option in Transmit Power parameter). * Fixed servo output driver for all hardwares and removed software servo driver. --- ### 3.34 #### Released 2018-01-24 * Added motor PID position to COMM_GET_VALUES. * Inverted direction angle normalization in mc_interface. * Use relative current mode in APP_ADC to support multiple VESCs with different current limits. --- ### 3.33 #### Released 2017-11-08 * Fixed CAN-bus baud rate update. --- ### 3.32 #### Released 2017-11-08 * Added CAN-bus baud rate setting. --- ### 3.31 #### Released 2017-10-27 * Option to decrease temperature limits during acceleration to still have braking torque left. * Added PID speed control mode to ADC app. --- ### 3.30 #### Released 2017-10-20 * Activated iterative observer for better operation at high ERPM. * Check for NAN and truncate some FOC variables. * Speed controller windup protection improvement. --- ### 3.29 #### Released 2017-09-21 * Disabled throttle limit scaling for now. * Increased packet timeout. --- ### 3.28 #### Released 2017-09-06 * DC_CAL timeout. * Added board configuration file to avoid braking at boot. * Shorter default fault stop time. * Lower default PPM ramping time. * Configurable beta value for motor thermistor. * Individual throttle curves for acceleration and braking. --- ### 3.27 #### Released 2017-09-04 * Watt hour reset bug fix * Changed the way custom applications are implemented. * FOC: high current sampling mode. --- ### 3.26 #### No official release * Current limit bug fix. It is now possible to apply break past the RPM limits. * Openloop RPM calculation bug fix. --- ### 3.25 #### No official release * APP multi-VESC PID control: send current instead of duty cycle for better load sharing. * Added relative current commands to mc_interface and comm_can. * APP ADC: added mode ADC_CTRL_TYPE_CURRENT_REV_BUTTON_BRAKE_ADC. * APP ADC: changed behavior when throttle and brake ADC channels are used simultaneously for smoother combination. * APP ADC: ramping support. * Flux linkage measurement: Added extra try with high integrator value. --- ### 3.24 #### No official release * Changed back inductance calculation since that seems to work much better in practise. (TODO: Have a closer look at why) --- ### 3.23 #### No official release * Improved inductance measurement (bug fix). * Multiple tries with different settings on flux linkage measurement. * Observer improvements for high speed operation and better performance across the whole speed range. * Compile time option to disable override limits. --- ### 3.22 #### No official release * Added hardware-specific limits to configuration parameters. * Permanent NRF bug fix. --- ### 3.21 #### No official release * Fixed regression in PID speed controller. --- ### 3.20 #### No official release * PID speed control: Set prev_error to error when the PID is off to make the start smoother. * Improved spinup algorithm for flux linkage and bldc parameter measurement. * APP ADC: Configurable center voltage for channel 1. * APP_UARTCOMM: Keep the processing thread running when stopping the app in case the configuration is made from the UART port itself. * Commands: Return results of long running commands to the port they came from even if commands come in between and change the last port. --- ### 3.19 #### No official release * Added terminal plugin hook implementation. Inspired by https://github.com/vedderb/bldc/pull/28 * Moved sampling buffers to CCM to free some RAM. * Added hardware info terminal command. * NRF init SPI check fix. * Sampled data is now transmitted in floating point with scaling done at the VESC. This avoids hard-coded scaling in VESC Tool. --- ### 3.18 #### No official release * NRF init SPI check. * Permanent NRF: reconfigure NRF pins to SPI pins on init failure in case the permanent NRF is not mounted and behave as if there is no permanent NRF. --- ### 3.17 #### No official release * Temperature filtering. * FOC: temperature resistance compensation. --- ### 3.16 #### No official release * FOC: stator saturation compensation parameter. * FOC: Another update for the fix for throttle limits to prevent loosing range at high speed when the battery current limit is lower than the motor current limit. * DRV8301: over current protection settings added to configuration. * DRV8301: Reset command andded to terminal. * DRV8301: Log fault code read over SPI. * DRV: Check for faults in ADC interrupt to catch the state as fast as possible. * Send phase samples as well with the sampling function. * New sampling modes for debugging. * BLDC and DC: Configurable switching frequency * FOC detect: increase minimum switching frequency for motor spinup to make it possible to detect high kv motors at high voltage. * FOC: observer gain scaling parameter for low modulation. --- ### 3.15 #### No official release * FOC: added the option for FOC sampling in both V0 and V7 to mcconf, so that it can be changed without recompiling the firmware. * FOC: tweaked repetition counter and preload to get cleaner waveforms with low latency. * FOC: Input voltage filterting and vd/vq filtering while undriven for more stable performance. --- ### 3.14 #### No official release * Different throttle curve modes * Improved FOC sensorless startup. --- ### 3.13 #### No official release * Throttle curve for PPM, ADC and Nunchuk. * Updated fix for throttle limits to prevent loosing range at high speed when the battery current limit is lower than the motor current limit. * APP PPM ramping. * APP ADC and PPM current range bug fix for some control modes. --- ### 3.12 #### No official release * APP PPM throttle center setting. --- ### 3.11 #### No official release * BLDC detect: disable direction inversion before detecting parameters. * FOC speed control: remove supply voltage scaling since that does not make any sense in current control mode. * BLDC speed control: added current-based speed controller option. * BLDC: heavier RPM filtering. * Speed control: option to disable braking in speed control mode. * Added wattage limits. Useful for following laws for electric vehicles in some regions. * Use override current limits to scale throttle inputs in apps. Will prevent the throttle from loosing rage at speed if e.g. the battery current limits are lower than the motor current limits. --- ### 3.10 #### Released 2016-11-06 * BLDC: removed cycles_running variable. * BLDC: update ADC sampling in correct order to avoid corrupt samples when the switching frequency changes a lot at once. * Terminal: print fault duty cycle state with one extra decimal. --- ### 3.09 #### Released 2016-11-06 * Configuration option for inverting the motor direction. * STM32 96-bit unique ID readout. --- ### 3.08 #### No official release * Communication protocol update for floating point variables. This breaks almost all compatibility with old firmwares. --- ### 3.07 #### Released 2016-11-04 * Delay after app and motor conf write. * Fixes NRF bug. * Fixes glitches if throttle is given while updating the configurations. * Lock mc_interface while storing configuration. * Nunchuk app local timeout. * Prevents the output thread from blocking other outputs after being used before. * Lock MC interface while storing configurations to flash. --- ### 3.06 #### No official release * spi_sw for NRF stop bug fix. --- ### 3.05 #### No official release * App NRF pairing. * App nunchuk chuk error restore bug fix. --- ### 3.04 #### No official release * HW version built into firmware. * Allows VESC Tool to only list firmwares compatible with the hardware. --- ### 3.02 #### No official release * hw_60 support. * hw_das support. * DRV8301 support. * SPI implementation. * Some terminal commands. * DRV8313 support. * 3 shunt support. * Phase shunt support. * Global RPM limit for both BLDC and FOC. * Hall sensor software filtering. * SPI software filtering. * The software filters remove the need for hardware filtering on the sensor port, making it work for all different sensors without modification. * Handbrake function for FOC (open loop braking). * FOC updates and fixes. * Current control signs. * Control loop integrator fixes. * Phase delay compensation and minimization. * More consistent flux linkage detection. * Resistance and inductance measurement bug fix that could cause a reboot. * Timer sampling improvement and cleanup. * Support for sampling in V0 and V7 when using phase shunts. * Fix reboot on over temperature fault code. * Motor temperature measurement and soft backoff. * Terminal command for rotating magnet field generation (ACIM experimentation). * Prevent motor start command during initialization. * Hardware specific default configuration support. * Stop functionality for apps so that reboots are not required anymore when changing app. * EEPROM emulation bug fix: https://github.com/vedderb/bldc/issues/27 --- ### 3.00 #### Released 2016-06-27 * HW60 support * 3 low/high side shunt support * permanent NRF option