mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
LP-385 - fixes from review
This commit is contained in:
parent
6c8dafec3c
commit
493a48ba2b
@ -162,7 +162,7 @@ static void CameraControlTask()
|
||||
float dn = pos.North - ccd->lastTriggerNEDPosition[0];
|
||||
float de = pos.East - ccd->lastTriggerNEDPosition[1];
|
||||
float distance = sqrtf((dn * dn) + (de * de));
|
||||
ccd->activity.TriggerMilliSecond = (int16_t)distance * 10.0f;
|
||||
ccd->activity.TriggerMillisecond = (int16_t)distance * 10.0f;
|
||||
if (distance > ccd->settings.SpaceInterval) {
|
||||
trigger = true;
|
||||
ccd->activity.Reason = CAMERACONTROLACTIVITY_REASON_AUTODISTANCE;
|
||||
@ -328,7 +328,7 @@ static void FillActivityInfo()
|
||||
activity->TriggerHour = time.Hour;
|
||||
activity->TriggerMinute = time.Minute;
|
||||
activity->TriggerSecond = time.Second;
|
||||
activity->TriggerMilliSecond = time.MilliSecond;
|
||||
activity->TriggerMillisecond = time.Millisecond;
|
||||
}
|
||||
|
||||
activity->SystemTS = xTaskGetTickCount() * portTICK_RATE_MS;
|
||||
|
@ -439,7 +439,7 @@ static void parse_ubx_nav_timeutc(struct UBXPacket *ubx, __attribute__((unused))
|
||||
GpsTime.Hour = timeutc->hour;
|
||||
GpsTime.Minute = timeutc->min;
|
||||
GpsTime.Second = timeutc->sec;
|
||||
GpsTime.MilliSecond = (int16_t)timeutc->nano / 1000000;
|
||||
GpsTime.Millisecond = (int16_t)(timeutc->nano / 1000000);
|
||||
GPSTimeSet(&GpsTime);
|
||||
} else {
|
||||
// Time is not valid, nothing to do
|
||||
|
@ -17,7 +17,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# These are the UAVObjects supposed to be build as part of the OpenPilot target
|
||||
# These are the UAVObjects supposed to be build as part of the target
|
||||
# (all architectures)
|
||||
UAVOBJSRCFILENAMES =
|
||||
UAVOBJSRCFILENAMES += statusgrounddrive
|
||||
|
@ -3,7 +3,7 @@
|
||||
<description>Contains position and timestamp of each camera operation</description>
|
||||
<field name="Latitude" units="degrees x 10^-7" type="int32" elements="1"/>
|
||||
<field name="Longitude" units="degrees x 10^-7" type="int32" elements="1"/>
|
||||
<field name="Altitude" units="meters" type="float" elements="1"/>
|
||||
<field name="Altitude" units="m" type="float" elements="1"/>
|
||||
<field name="Roll" units="degrees" type="float" elements="1"/>
|
||||
<field name="Pitch" units="degrees" type="float" elements="1"/>
|
||||
<field name="Yaw" units="degrees" type="float" elements="1"/>
|
||||
@ -13,7 +13,7 @@
|
||||
<field name="TriggerHour" units="" type="int8" elements="1"/>
|
||||
<field name="TriggerMinute" units="" type="int8" elements="1"/>
|
||||
<field name="TriggerSecond" units="" type="int8" elements="1"/>
|
||||
<field name="TriggerMilliSecond" units="" type="int16" elements="1"/>
|
||||
<field name="TriggerMillisecond" units="ms" type="int16" elements="1"/>
|
||||
<field name="Activity" units="" type="enum" elements="1" options="Idle,TriggerPicture,StartVideo,StopVideo" default="None"/>
|
||||
<field name="Reason" units="" type="enum" elements="1" options="Manual,AutoDistance,AutoTime" default="Manual"/>
|
||||
<field name="SystemTS" units="ms" type="uint32" elements="1"/>
|
||||
@ -22,4 +22,4 @@
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="manual" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
</xml>
|
@ -6,7 +6,7 @@
|
||||
<field name="AutoTriggerMode" units="mode" type="enum" elements="1" options="Disabled,WhenArmed,Always,Input,Mission" defaultvalue="WhenArmed"/>
|
||||
<field name="OutputValues" units="%" type="float" elementnames="Idle,Shot,Video" defaultvalue="0,-1,1" />
|
||||
<field name="InputValues" units="%" type="float" elementnames="Idle,Shot,Video" defaultvalue="0,-1,1" />
|
||||
<field name="TriggerPulseWidth" units="ms" type="uint8" elements="1" defaultvalue="50"/>
|
||||
<field name="TriggerPulseWidth" units="ms" type="uint16" elements="1" defaultvalue="50"/>
|
||||
<field name="TimeInterval" units="s" type="float" elements="1" defaultvalue="5"/>
|
||||
<field name="SpaceInterval" units="m" type="float" elements="1" defaultvalue="0"/>
|
||||
<field name="MinimumTimeInterval" units="s" type="float" elements="1" defaultvalue="2.5"/>
|
||||
@ -15,8 +15,4 @@
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
<logging updatemode="manual" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
||||
|
||||
|
||||
|
||||
</xml>
|
@ -7,7 +7,7 @@
|
||||
<field name="Hour" units="" type="int8" elements="1"/>
|
||||
<field name="Minute" units="" type="int8" elements="1"/>
|
||||
<field name="Second" units="" type="int8" elements="1"/>
|
||||
<field name="MilliSecond" units="" type="int16" elements="1"/>
|
||||
<field name="Millisecond" units="ms" type="int16" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="10000"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user