collin80 / GEVCU

Generalized Electric Vehicle Control Unit
114 stars 56 forks source link

Merge WIP, extend Webpage, Refactor MotorControllers #93

Closed neuweiler closed 9 years ago

neuweiler commented 9 years ago

Merge branch 'WIP' into ArduinoDue BrusaDMC5: fix remaining quirks Webpages: overhaul, add charger and dcdc to website SerialConsole: extend commands to support charger and dcdc converter SerialConsole, Webpage: support device specific config SerialConsole, Webpage: separate menu printing and parameter processing Throttle: re-enable throttle-regen ramping from 0 to maximumRegen Webpage: fix jumping needles in dashboard CANThrottle: filter ECU responses not related to throttle position to prevent unwanted movement Webpage:fully supports dynamic display of parameters depending on device selection MotorController: refactoring MotorContorller: move maxMechanicalPowerMotor, maxMechanicalPowerRegen to MotorControllerConfig as DMOC also supports it -> now configurable for DMOC Device: handleStateChange now also passes the old state Coda and DMOC motor controllers: clean-up of code MotorController: moved calculation of speedRequested and torqueRequested to MotorController as it's the same for all, made them read-only for subclasses ! MotorController: added config->invertDirection support also for DMOC and Coda MotorContorller: moved OperationState back to DMOC as its specific for DMOC and flags ready/running/powerOn are sufficient Status: removed controller/motor temp from status as it can be directly querried from the MotorController Brusa devices and CAN brake/throttle: only enabled whenn needed (send/receive CAN messages) MotorController: now checks for missing messages from controllers, no individual checks in sub-classes BrusaDMC5: constrain values to prevent overflow (going from full throttle to full reverse) if misconfigured TickHandler, CANHandler, DeviceManager, Status, MemCache and SystemIO: classes are now stack instantiated like FaultHandler (no more need to use getInstance()) BrusaDMC5: controller is put into stand-by at 0 throttle and 0 speed to save energy BrusaDMC5: Fix reported actual speed and actual torque