![]() |
Speeduino
|
#include "tsCommandController.h"#include "../../../sensors.h"#include "../../../storage.h"#include "../../../SD_logger.h"#include "../../../pages.h"#include "../../../scheduledIO_ign.h"#include "../../../scheduledIO_inj.h"#include "../../../scheduler_fuel_controller.h"#include "../../../scheduler_ignition_controller.h"Functions | |
| static bool | commandRequiresStoppedEngine (uint16_t command) |
| static void | injectorOn (const statuses ¤t, uint8_t injector) |
| static void | injectorOff (const statuses ¤t, uint8_t injector) |
| static void | injectorPulse (const statuses ¤t, uint8_t injector) |
| static uint8_t | computeChannel (uint16_t cmd, uint16_t baseCmd2, uint16_t baseCmd1) |
| Given 3 command indexes, calculate the channel number. | |
| static void | coilOn (const statuses ¤t, uint8_t channel) |
| static void | coilOff (const statuses ¤t, uint8_t channel) |
| static void | coilPulse (const statuses ¤t, uint8_t channel) |
| static void | computeVssRatio (statuses ¤t, config2 &page2, uint8_t ratioIndex) |
| TESTABLE_STATIC uint16_t | calcPulsesPerKm (const statuses ¤t, const config2 &page2, uint32_t(*pGetGap)(byte)) |
| bool | handleTsCommand (uint16_t command, statuses ¤t, config2 &page2) |
| Process a command from TunerStudio. | |
| static uint8_t | nextPulseCount (uint8_t current, uint8_t max) |
| static void | openPulsedInjectors (void) |
| static void | closePulsedInjectors (const config13 &page13) |
| static void | beginChargingPulsedCoils (void) |
| static void | dischargePulsedCoils (const config13 &page13) |
| void | pulsedCommandController (const statuses ¤t, const config13 &page13) |
| Start/stop pulsing injectors & coils based on configuration set by handleTsCommand. | |
Variables | |
| TESTABLE_STATIC uint8_t | testInjectorPulseCount = 0 |
| TESTABLE_STATIC uint8_t | testIgnitionPulseCount = 0 |
| TESTABLE_STATIC byte | HWTest_INJ_Pulsed |
| TESTABLE_STATIC byte | HWTest_IGN_Pulsed |
Header file for the TunerStudio command handler The command handler manages all the inputs FROM TS which are issued when a command button is clicked by the user
|
static |


| TESTABLE_STATIC uint16_t calcPulsesPerKm | ( | const statuses & | current, |
| const config2 & | page2, | ||
| uint32_t(*)(byte) | pGetGap | ||
| ) |

|
static |


|
static |


|
static |


|
static |


|
static |

|
static |
Given 3 command indexes, calculate the channel number.
| cmd | Command index to convert to channel. E.g. TS_CMD_IGN5_ON |
| baseCmd2 | First command index. E.g. TS_CMD_IGN2_ON |
| baseCmd1 | First command index. E.g. TS_CMD_IGN1_ON |



|
static |


Process a command from TunerStudio.
| command | The command number of the button that was clicked. See TS_CommendButtonHandler.h for a list of button IDs |


|
static |


|
static |


|
static |


|
static |


|
static |


Start/stop pulsing injectors & coils based on configuration set by handleTsCommand.
Must be called at least once a millisecond from the main loop


| TESTABLE_STATIC byte HWTest_IGN_Pulsed |
Each bit in this variable represents one of the ignition channels and it's 50% HW test status
| TESTABLE_STATIC byte HWTest_INJ_Pulsed |
Each bit in this variable represents one of the injector channels and it's 50% HW test status
| TESTABLE_STATIC uint8_t testIgnitionPulseCount = 0 |
| TESTABLE_STATIC uint8_t testInjectorPulseCount = 0 |