mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-479 Set lowest acceptable dshot rate to 150khz to avoid possible division by zero and unreasonably slow rates.
This commit is contained in:
parent
50fce728f8
commit
ce3cba9d40
@ -215,6 +215,10 @@ extern void PIOS_Servo_Enable()
|
||||
|
||||
void PIOS_Servo_DSHot_Rate(uint32_t rate_in_khz)
|
||||
{
|
||||
if (rate_in_khz < 150) {
|
||||
rate_in_khz = 150;
|
||||
}
|
||||
|
||||
uint32_t raw_hz = PIOS_DELAY_GetRawHz();
|
||||
|
||||
uint32_t tmp = raw_hz / rate_in_khz;
|
||||
|
@ -3,7 +3,7 @@
|
||||
<description>Settings for the @ref ActuatorModule that controls the channel assignments for the mixer based on AircraftType</description>
|
||||
<field name="BankUpdateFreq" units="Hz" type="uint16" elements="6" defaultvalue="50"/>
|
||||
<field name="BankMode" type="enum" units="" elements="6" options="PWM,PWMSync,OneShot125,OneShot42,MultiShot,DShot" defaultvalue="PWM"/>
|
||||
<field name="DShotMode" units="kHz" type="uint16" elements="1" defaultvalue="600"/>
|
||||
<field name="DShotMode" units="kHz" type="uint16" elements="1" defaultvalue="600" limits="%BE:150:1200"/>
|
||||
<field name="ChannelMax" units="us" type="int16" elements="12" defaultvalue="1000"/>
|
||||
<field name="ChannelNeutral" units="us" type="int16" elements="12" defaultvalue="1000"/>
|
||||
<field name="ChannelMin" units="us" type="int16" elements="12" defaultvalue="1000"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user