docs & code formatting
This commit is contained in:
parent
1d328c17e8
commit
7dfdfc6378
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Nov 19 09:22:43 EST 2019
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Nov 19 09:23:08 EST 2019
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
|
||||
|
@ -2737,7 +2737,8 @@ struct board_configuration_s {
|
|||
*/
|
||||
can_device_mode_e canDeviceMode;
|
||||
/**
|
||||
* Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board. See also directSelfStimulation which is different.
|
||||
* Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.
|
||||
* See also directSelfStimulation which is different.
|
||||
* offset 136
|
||||
*/
|
||||
brain_pin_e triggerSimulatorPins[TRIGGER_SIMULATOR_PIN_COUNT];
|
||||
|
@ -4947,4 +4948,4 @@ typedef struct persistent_config_s persistent_config_s;
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Nov 19 09:22:43 EST 2019
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Nov 19 09:23:08 EST 2019
|
||||
|
|
|
@ -720,7 +720,7 @@ static void handleExecuteCommand(ts_channel_s *tsChannel, char *data, int incomi
|
|||
*/
|
||||
bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command) {
|
||||
// Bail fast if guaranteed not to be a plain command
|
||||
if(command == 0)
|
||||
if (command == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,9 @@ void nmea_parse_gpgga(char *nmea, loc_t *loc) {
|
|||
|
||||
p = strchr(p, ',') + 1; // in p string started with searching address
|
||||
str_till_comma(p, dStr); // str to float till comma saved modified string
|
||||
if(strlen(p) == 0) return; // if no data in field - empty data - we return
|
||||
if (strlen(p) == 0) {
|
||||
return; // if no data in field - empty data - we return
|
||||
}
|
||||
|
||||
loc->latitude = atoff(dStr); // fulfil data
|
||||
|
||||
|
@ -182,7 +184,7 @@ void nmea_parse_gprmc(char *nmea, loc_t *loc) {
|
|||
|
||||
p = strchr(p, ',') + 1; //read time
|
||||
str_till_comma(p, dStr);
|
||||
if(strlen(dStr) > 5){
|
||||
if (strlen(dStr) > 5) {
|
||||
timp.tm_hour = str2int(dStr,2);
|
||||
timp.tm_min = str2int(dStr+2,2);
|
||||
timp.tm_sec = str2int(dStr+4,2);
|
||||
|
@ -191,7 +193,7 @@ void nmea_parse_gprmc(char *nmea, loc_t *loc) {
|
|||
p = strchr(p, ',') + 1; //read field Valid status
|
||||
str_till_comma(p, dStr);
|
||||
|
||||
if(dStr[0] == 'V') { // if field is invalid
|
||||
if (dStr[0] == 'V') { // if field is invalid
|
||||
loc->quality = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -242,13 +244,13 @@ void nmea_parse_gprmc(char *nmea, loc_t *loc) {
|
|||
|
||||
p = strchr(p, ',') + 1; //read date
|
||||
str_till_comma(p, dStr);
|
||||
if(strlen(dStr) > 5){
|
||||
if (strlen(dStr) > 5) {
|
||||
timp.tm_mday = str2int(dStr,2);
|
||||
timp.tm_mon = str2int(dStr+2,2);
|
||||
timp.tm_year = str2int(dStr+4,2)+100; // we receive -200, but standard wait -1900 = add correction
|
||||
}
|
||||
|
||||
if( timp.tm_year > 0 ) { // check if date field is valid
|
||||
if (timp.tm_year > 0 ) { // check if date field is valid
|
||||
memcpy(&loc->GPStm, &timp, sizeof(timp));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ MultiWave::MultiWave() {
|
|||
reset();
|
||||
}
|
||||
|
||||
MultiWave::MultiWave(float *switchTimes, SingleWave *waves) : MultiWave(){
|
||||
MultiWave::MultiWave(float *switchTimes, SingleWave *waves) : MultiWave() {
|
||||
init(switchTimes, waves);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ static void executorCallback(void *arg) {
|
|||
efiAssertVoid(CUSTOM_ERR_6624, getCurrentRemainingStack() > 256, "lowstck#2y");
|
||||
|
||||
// callbackTime = getTimeNowNt();
|
||||
// if((callbackTime > nextEventTimeNt) && (callbackTime - nextEventTimeNt > US2NT(5000))) {
|
||||
// if ((callbackTime > nextEventTimeNt) && (callbackTime - nextEventTimeNt > US2NT(5000))) {
|
||||
// timerIsLate++;
|
||||
// }
|
||||
|
||||
|
|
|
@ -32,16 +32,14 @@ bool TwoPinDcMotor::Set(float duty)
|
|||
|
||||
bool isPositive = duty > 0;
|
||||
|
||||
if(!isPositive)
|
||||
{
|
||||
if (!isPositive) {
|
||||
duty = -duty;
|
||||
}
|
||||
|
||||
// below here 'duty' is a not negative
|
||||
|
||||
// Clamp to 100%
|
||||
if(duty > 1.0f)
|
||||
{
|
||||
if (duty > 1.0f) {
|
||||
duty = 1.0f;
|
||||
}
|
||||
// Disable for very small duty
|
||||
|
|
|
@ -73,5 +73,5 @@
|
|||
// Human-readable: fsio_table (3, rpm, map) / 100
|
||||
#define BOOST_CONTROLLER "3 rpm map fsio_table 100 /"
|
||||
|
||||
// Human-readable: if(fsio_setting (0) > 20, 0, 10)
|
||||
// Human-readable: if (fsio_setting (0) > 20, 0, 10)
|
||||
#define ANALOG_CONDITION "0 fsio_setting 20 > 0 10 if"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#define FOUR_STROKE_ENGINE_CYCLE 720
|
||||
|
||||
#if EFI_ENABLE_ASSERTS
|
||||
#define assertAngleRange(angle, msg, code) if(angle > 10000000 || angle < -10000000) { firmwareError(code, "angle range %s %.2f", msg, angle);angle = 0;}
|
||||
#define assertAngleRange(angle, msg, code) if (angle > 10000000 || angle < -10000000) { firmwareError(code, "angle range %s %.2f", msg, angle);angle = 0;}
|
||||
#else
|
||||
#define assertAngleRange(angle, msg, code) {}
|
||||
#endif
|
||||
|
|
|
@ -422,8 +422,7 @@ static void printFullAdcReport(Logging *logger) {
|
|||
|
||||
adc_channel_e hwIndex = slowAdc.getAdcHardwareIndexByInternalIndex(index);
|
||||
|
||||
if(hwIndex != EFI_ADC_NONE && hwIndex != EFI_ADC_ERROR)
|
||||
{
|
||||
if (hwIndex != EFI_ADC_NONE && hwIndex != EFI_ADC_ERROR) {
|
||||
ioportid_t port = getAdcChannelPort("print", hwIndex);
|
||||
int pin = getAdcChannelPin(hwIndex);
|
||||
|
||||
|
@ -600,8 +599,6 @@ void initAdcInputs() {
|
|||
#endif /* HAL_USE_PWM */
|
||||
}
|
||||
|
||||
//if(slowAdcChannelCount > ADC_MAX_SLOW_CHANNELS_COUNT) // todo: do we need this logic? do we need this check
|
||||
|
||||
addConsoleActionI("adc", (VoidInt) printAdcValue);
|
||||
#else
|
||||
printMsg(&logger, "ADC disabled");
|
||||
|
|
|
@ -433,7 +433,7 @@ int tle8888SpiStartupExchange(void * data) {
|
|||
if (response == 253) {
|
||||
// I've seen this response on red board
|
||||
initResponsesAccumulator += 4;
|
||||
} else if (response == 2408){
|
||||
} else if (response == 2408) {
|
||||
// and I've seen this response on red board
|
||||
initResponsesAccumulator += 100;
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ static void download_register(int r_target) {
|
|||
// retrieve data, send it, increase pointer
|
||||
// increase
|
||||
|
||||
if(r_size > MAX_SPI_MODE_A_TRANSFER_SIZE) //if size is too large, split into two sections ... MULTIPLE sections..
|
||||
if (r_size > MAX_SPI_MODE_A_TRANSFER_SIZE) //if size is too large, split into two sections ... MULTIPLE sections..
|
||||
{
|
||||
remainder_size = r_size - MAX_SPI_MODE_A_TRANSFER_SIZE; // creates remaining size
|
||||
r_size = MAX_SPI_MODE_A_TRANSFER_SIZE; // sets first size
|
||||
|
@ -249,7 +249,7 @@ static void download_register(int r_target) {
|
|||
|
||||
spiSend(driver, r_size, reg_ptr);
|
||||
|
||||
if(remainder_size > 0) // if remainder size is greater than 0, download the rest
|
||||
if (remainder_size > 0) // if remainder size is greater than 0, download the rest
|
||||
{
|
||||
r_start_address += r_size; // new start address
|
||||
r_command = r_start_address << 5; // start address
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
EXTERN_ENGINE;
|
||||
|
||||
CJ125::CJ125() : wboHeaterControl("wbo"),
|
||||
heaterPid(&heaterPidConfig){
|
||||
heaterPid(&heaterPidConfig) {
|
||||
}
|
||||
|
||||
void CJ125::SetHeater(float value DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
@ -109,7 +109,7 @@ bool CJ125::isValidState() const {
|
|||
}
|
||||
|
||||
void CJ125::cjInitPid(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
if(engineConfiguration->cj125isLsu49) {
|
||||
if (engineConfiguration->cj125isLsu49) {
|
||||
heaterPidConfig.pFactor = CJ125_PID_LSU49_P;
|
||||
heaterPidConfig.iFactor = CJ125_PID_LSU49_I;
|
||||
} else {
|
||||
|
|
|
@ -298,7 +298,7 @@ void Logging::appendPrintf(const char *fmt, ...) {
|
|||
Logging::Logging() {
|
||||
}
|
||||
|
||||
Logging::Logging(char const *name, char *buffer, int bufferSize) : Logging(){
|
||||
Logging::Logging(char const *name, char *buffer, int bufferSize) : Logging() {
|
||||
#if ! EFI_UNIT_TEST
|
||||
initLoggingExt(name, buffer, bufferSize);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue