Compare commits
2 Commits
3ca5e41602
...
a3778fcb6e
Author | SHA1 | Date | |
---|---|---|---|
a3778fcb6e | |||
86f153bf69 |
@ -135,12 +135,10 @@ enum config_parser_ret config_parser_get_line(config_parser_handle_t handle, str
|
|||||||
return CONFIG_PARSER_LINE_MALFORM;
|
return CONFIG_PARSER_LINE_MALFORM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
token_round++;
|
token_round++;
|
||||||
strtok(NULL, token_delim);
|
strtok(NULL, token_delim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return CONFIG_PARSER_OK;
|
return CONFIG_PARSER_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,8 @@ static int sdio_switch_appmode_cmd55()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum acmd41_ret sdio_init_card_acmd41(uint8_t HCS){
|
enum acmd41_ret sdio_init_card_acmd41(uint8_t HCS)
|
||||||
|
{
|
||||||
uint32_t response;
|
uint32_t response;
|
||||||
int retry = 0x20;
|
int retry = 0x20;
|
||||||
if (sdio_switch_appmode_cmd55())
|
if (sdio_switch_appmode_cmd55())
|
||||||
|
@ -73,13 +73,13 @@ float pid_sample(struct pid_controller *pid, float deviation)
|
|||||||
float output;
|
float output;
|
||||||
|
|
||||||
if (!pid)
|
if (!pid)
|
||||||
return 0.0;
|
return 0.0f;
|
||||||
|
|
||||||
output = deviation * pid->k_p;
|
output = deviation * pid->k_p;
|
||||||
|
|
||||||
/* PID runaway compensation */
|
/* PID runaway compensation */
|
||||||
if (!(deviation > 0.0f && pid->control_output > pid->output_sat_max - 0.5) &&
|
if (!(deviation > 0.0f && pid->control_output > pid->output_sat_max - 0.5f) &&
|
||||||
!(deviation < 0.0f && pid->control_output < pid->output_sat_min + 0.5)) {
|
!(deviation < 0.0f && pid->control_output < pid->output_sat_min + 0.5f)) {
|
||||||
calculate_integral(pid, deviation);
|
calculate_integral(pid, deviation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user