docs & code formatting

This commit is contained in:
rusefi 2019-11-19 18:17:03 -05:00
parent 67e4a7c8d7
commit 19bdb9a35f
12 changed files with 21 additions and 24 deletions

View File

@ -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

View File

@ -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

View File

@ -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");