Included pull request advices.

This commit is contained in:
hrvoje
2016-03-31 19:33:47 +02:00
599 changed files with 4616 additions and 4788 deletions
-13
View File
@@ -1,13 +0,0 @@
<conf>
<aircraft
name="ardrone2"
ac_id="101"
airframe="airframes/HB/hb_ardrone2_opticflowtest.xml"
radio="radios/dummy.xml"
telemetry="telemetry/default_rotorcraft.xml"
flight_plan="flight_plans/HB/hb_cyberzoo.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/air_data.xml modules/cv_opticflow.xml"
gui_color="#ffffe945aacd"
/>
</conf>
@@ -1,248 +0,0 @@
<?xml version="1.0"?>
<control_panel name="paparazzi control panel">
<section name="programs">
<program name="Server" command="sw/ground_segment/tmtc/server"/>
<program name="Data Link" command="sw/ground_segment/tmtc/link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
</program>
<program name="Link Combiner" command="sw/ground_segment/python/redundant_link/link_combiner.py"/>
<program name="GCS" command="sw/ground_segment/cockpit/gcs"/>
<program name="Flight Plan Editor" command="sw/ground_segment/cockpit/gcs">
<arg flag="-edit"/>
</program>
<program name="Messages" command="sw/ground_segment/tmtc/messages"/>
<program name="Messages (Python)" command="sw/ground_segment/python/messages_app/messagesapp.py"/>
<program name="Settings" command="sw/ground_segment/tmtc/settings">
<arg flag="-ac" constant="@AIRCRAFT"/>
</program>
<program name="Settings (Python)" command="sw/ground_segment/python/settings_app/settingsapp.py">
<arg flag="--ac_id" constant="@AC_ID"/>
</program>
<program name="GPSd position display" command="sw/ground_segment/tmtc/gpsd2ivy"/>
<program name="Log Plotter" command="sw/logalizer/logplotter"/>
<program name="Real-time Plotter" command="sw/logalizer/plotter"/>
<program name="Real-time Plotter (Python)" command="sw/ground_segment/python/real_time_plot/realtimeplotapp.py"/>
<program name="Log File Player" command="sw/logalizer/play"/>
<program name="Simulator" command="sw/simulator/pprzsim-launch">
<arg flag="-a" constant="@AIRCRAFT"/>
</program>
<program name="Video Synchronizer" command="sw/ground_segment/misc/video_synchronizer"/>
<program name="Joystick" command="sw/ground_segment/joystick/input2ivy">
<arg flag="-ac" constant="@AIRCRAFT"/>
<arg flag="xbox_gamepad.xml"/>
</program>
<program name="Environment Simulator" command="sw/simulator/gaia"/>
<program name="Http Server" command="$python">
<arg flag="-m" constant="SimpleHTTPServer"/>
<arg flag="8889"/>
</program>
<program name="Plot Meteo Profile" command="sw/logalizer/plotprofile"/>
<program name="Weather Station" command="sw/ground_segment/misc/davis2ivy">
<arg flag="-d" constant="/dev/ttyUSB1"/>
</program>
<program name="Attitude Visualizer" command="sw/tools/attitude_viz.py"/>
<program name="App Server" command="sw/ground_segment/tmtc/app_server"/>
<program name="NatNet" command="sw/ground_segment/misc/natnet2ivy"/>
<program name="Ivy2Nmea" command="sw/ground_segment/tmtc/ivy2nmea">
<arg flag="--port" constant="/dev/ttyUSB1"/>
<arg flag="--id" constant="1"/>
</program>
<program name="BluegigaUsbDongleScanner" command="sw/tools/bluegiga_usb_dongle/bluegiga_usb_driver">
<arg flag="/dev/ttyACM2"/>
<arg flag="scan" />
</program>
<program name="BluegigaUsbDongle" command="sw/tools/bluegiga_usb_dongle/bluegiga_usb_driver">
<arg flag="/dev/ttyACM2"/>
<arg flag="00:07:00:2d:d6:bb" />
<arg flag="4242" />
<arg flag="4252" />
</program>
<program name="ADS-B Intruders receiver" command="sw/ground_segment/misc/sbs2ivy">
<arg flag="--ac" constant="@AC_ID"/>
</program>
</section>
<section name="sessions">
<session name="Flight UDP/WiFi">
<program name="Server"/>
<program name="GCS"/>
<program name="Data Link">
<arg flag="-udp"/>
</program>
</session>
<session name="Flight USB-serial@9600">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
</program>
<program name="Server"/>
<program name="GCS"/>
</session>
<session name="Flight USB-serial@57600">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server"/>
<program name="GCS"/>
</session>
<session name="Flight USB-XBee-API@57600">
<program name="Data Link">
<arg flag="-d" constant="/dev/paparazzi/xbee"/>
<arg flag="-transport" constant="xbee"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server"/>
<program name="GCS"/>
</session>
<session name="Flight USB-serial Redundant">
<program name="Server"/>
<program name="GCS"/>
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
<arg flag="-id" constant="1"/>
<arg flag="-redlink"/>
</program>
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB1"/>
<arg flag="-id" constant="2"/>
<arg flag="-redlink"/>
</program>
<program name="Link Combiner"/>
</session>
<session name="SupperBitRF">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyACM0"/>
</program>
<program name="Server"/>
<program name="GCS"/>
<program name="Messages"/>
</session>
<session name="SupperBitRF cable telemetry">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyACM1"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server"/>
<program name="GCS"/>
<program name="Messages"/>
<program name="Messages"/>
</session>
<session name="Messages and Settings">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server">
<arg flag="-n"/>
</program>
<program name="Messages"/>
<program name="Settings">
<arg flag="-ac" constant="@AIRCRAFT"/>
</program>
</session>
<session name="Raw Sensors">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server">
<arg flag="-n"/>
</program>
<program name="Messages">
<arg flag="-g" constant="300x400+0-220"/>
</program>
<program name="Settings">
<arg flag="-ac" constant="@AIRCRAFT"/>
<arg flag="-g" constant="800x200+0-0"/>
</program>
<program name="Real-time Plotter">
<arg flag="-g" constant="1000x250-0+0"/>
<arg flag="-t" constant="ACC"/>
<arg flag="-u" constant="0.05"/>
<arg flag="-c" constant="0.00"/>
<arg flag="-c" constant="*:telemetry:IMU_ACCEL_RAW:ax"/>
<arg flag="-c" constant="*:telemetry:IMU_ACCEL_RAW:ay"/>
<arg flag="-c" constant="*:telemetry:IMU_ACCEL_RAW:az"/>
<arg flag="-n"/>
<arg flag="-g" constant="1000x250-0+250"/>
<arg flag="-t" constant="GYRO"/>
<arg flag="-u" constant="0.05"/>
<arg flag="-c" constant="0.00"/>
<arg flag="-c" constant="*:telemetry:IMU_GYRO_RAW:gp"/>
<arg flag="-c" constant="*:telemetry:IMU_GYRO_RAW:gq"/>
<arg flag="-c" constant="*:telemetry:IMU_GYRO_RAW:gr"/>
<arg flag="-n"/>
<arg flag="-g" constant="1000x250-0+500"/>
<arg flag="-t" constant="MAG"/>
<arg flag="-u" constant="0.05"/>
<arg flag="-c" constant="0.00"/>
<arg flag="-c" constant="*:telemetry:IMU_MAG_RAW:mx"/>
<arg flag="-c" constant="*:telemetry:IMU_MAG_RAW:my"/>
<arg flag="-c" constant="*:telemetry:IMU_MAG_RAW:mz"/>
<arg flag="-n"/>
<arg flag="-g" constant="1000x250-0+750"/>
<arg flag="-t" constant="BARO"/>
<arg flag="-u" constant="0.05"/>
<arg flag="-c" constant="101325.0"/>
<arg flag="-c" constant="*:telemetry:BARO_RAW:abs"/>
</program>
</session>
<session name="Scaled Sensors">
<program name="Data Link">
<arg flag="-d" constant="/dev/ttyUSB0"/>
<arg flag="-s" constant="57600"/>
</program>
<program name="Server">
<arg flag="-n"/>
</program>
<program name="Messages">
<arg flag="-g" constant="300x400+0-220"/>
</program>
<program name="Settings">
<arg flag="-ac" constant="@AIRCRAFT"/>
<arg flag="-g" constant="800x200+0-0"/>
</program>
<program name="Real-time Plotter">
<arg flag="-g" constant="1000x250-0+0"/>
<arg flag="-t" constant="ACC"/>
<arg flag="-u" constant="0.05"/>
<arg flag="-c" constant="9.81"/>
<arg flag="-c" constant="0.00"/>
<arg flag="-c" constant="-9.81"/>
<arg flag="-c" constant="*:telemetry:IMU_ACCEL_SCALED:ax:0.0009766"/>
<arg flag="-c" constant="*:telemetry:IMU_ACCEL_SCALED:ay:0.0009766"/>
<arg flag="-c" constant="*:telemetry:IMU_ACCEL_SCALED:az:0.0009766"/>
<arg flag="-n"/>
<arg flag="-g" constant="1000x250-0+250"/>
<arg flag="-t" constant="GYRO"/>
<arg flag="-u" constant="0.05"/>
<arg flag="-c" constant="0.00"/>
<arg flag="-c" constant="*:telemetry:IMU_GYRO_SCALED:gp:0.0139882"/>
<arg flag="-c" constant="*:telemetry:IMU_GYRO_SCALED:gq:0.0139882"/>
<arg flag="-c" constant="*:telemetry:IMU_GYRO_SCALED:gr:0.0139882"/>
<arg flag="-n"/>
<arg flag="-g" constant="1000x250-0+500"/>
<arg flag="-t" constant="MAG"/>
<arg flag="-u" constant="0.05"/>
<arg flag="-c" constant="0.00"/>
<arg flag="-c" constant="*:telemetry:IMU_MAG_SCALED:mx:0.0004883"/>
<arg flag="-c" constant="*:telemetry:IMU_MAG_SCALED:my:0.0004883"/>
<arg flag="-c" constant="*:telemetry:IMU_MAG_SCALED:mz:0.0004883"/>
</program>
</session>
</section>
</control_panel>
+3 -3
View File
@@ -216,9 +216,9 @@
<configure name="MODEM_BAUD" value="B9600"/>
</subsystem>
<subsystem name="ins" type="xsens">
<configure name="XSENS_UART_NR" value="1"/>
</subsystem>
<module name="ins" type="xsens">
<configure name="XSENS_PORT" value="uart1"/>
</module>
</firmware>
+8 -8
View File
@@ -36,10 +36,10 @@
<configure name="MODEM_BAUD" value="B9600"/>
<configure name="MODEM_PORT" value="UART3"/>
</subsystem>
<subsystem name="ins" type="xsens700">
<configure name="XSENS_UART_NR" value="1"/>
<configure name="XSENS_UART_BAUD" value="B230400"/>
</subsystem>
<module name="ins" type="xsens700">
<configure name="XSENS_PORT" value="uart1"/>
<configure name="XSENS_BAUD" value="B230400"/>
</module>
</target>
<target name="fbw" board="lisa_m_2.0">
<configure name="SEPARATE_FBW" value="1"/>
@@ -70,10 +70,10 @@
<configure name="MODEM_BAUD" value="B9600"/>
<configure name="MODEM_PORT" value="UART3"/>
</subsystem>
<subsystem name="ins" type="xsens700">
<configure name="XSENS_UART_NR" value="1"/>
<configure name="XSENS_UART_BAUD" value="B230400"/>
</subsystem>
<module name="ins" type="xsens700">
<configure name="XSENS_PORT" value="uart1"/>
<configure name="XSENS_BAUD" value="B230400"/>
</module>
</target>
<define name="AGR_CLIMB"/>
<define name="LOITER_TRIM"/>
+4 -4
View File
@@ -25,10 +25,10 @@
<subsystem name="control"/>
<!-- Sensors -->
<subsystem name="navigation"/>
<subsystem name="ins" type="xsens">
<configure name="XSENS_UART_NR" value="0"/>
<configure name="XSENS_UART_BAUD" value="B230400"/>
</subsystem>
<module name="ins" type="xsens">
<configure name="XSENS_PORT" value="uart0"/>
<configure name="XSENS_BAUD" value="B230400"/>
</module>
</firmware>
<!-- ************************* MODULES ************************* -->
+1
View File
@@ -96,6 +96,7 @@
<module name="ahrs" type="int_cmpl_quat"/>
</target>
<target name="test_module" board="lisa_mx_2.0">
<module name="usb_serial_stm32_example1"/>
</target>
</firmware>
@@ -1,218 +0,0 @@
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
<airframe name="ardrone2">
<firmware name="rotorcraft">
<target name="ap" board="ardrone2"/>
<target name="nps" board="pc">
<subsystem name="fdm" type="jsbsim"/>
</target>
<define name="USE_SONAR" value="TRUE"/>
<!-- Subsystem section -->
<subsystem name="telemetry" type="transparent_udp"/>
<subsystem name="radio_control" type="datalink"/>
<subsystem name="motor_mixing"/>
<subsystem name="actuators" type="ardrone2"/>
<subsystem name="imu" type="ardrone2"/>
<!-- gps: "ublox" or change to "sirf" for usage with parrot flight recorder -->
<subsystem name="gps" type="datalink"/>
<subsystem name="stabilization" type="int_quat"/>
<subsystem name="ahrs" type="int_cmpl_quat">
<configure name="USE_MAGNETOMETER" value="FALSE"/> <!-- Heading is from Optitrack, in reguler outside flight case one would use and Magnetometer-->
<define name="AHRS_USE_GPS_HEADING" value="TRUE"/>
</subsystem>
<subsystem name="ins" type="extended"/>
</firmware>
<modules main_freq="512">
<load name="bat_voltage_ardrone2.xml"/>
<!-- remove the gps_ubx_ucenter module if you use the sirf gps (flight recorder) -->
<load name="air_data.xml"/>
<!--load name="logger_file.xml"/-->
<!--
<load name="video_thread.xml">
<define name="VIDEO_THREAD_CAMERA" value="front_camera"/>
</load>
-->
<!--load name="video_rtp_stream.xml"/-->
<load name="cv_opticflow.xml"/>
<!--<load name="opticflow_hover.xml"/> -->
</modules>
<commands>
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
<axis name="THRUST" failsafe_value="3000"/>
</commands>
<servos driver="Default">
<servo name="TOP_LEFT" no="0" min="0" neutral="1" max="500"/>
<servo name="TOP_RIGHT" no="1" min="0" neutral="1" max="500"/>
<servo name="BOTTOM_RIGHT" no="2" min="0" neutral="1" max="500"/>
<servo name="BOTTOM_LEFT" no="3" min="0" neutral="1" max="500"/>
</servos>
<section name="MIXING" prefix="MOTOR_MIXING_">
<define name="TRIM_ROLL" value="0"/>
<define name="TRIM_PITCH" value="0"/>
<define name="TRIM_YAW" value="0"/>
<!-- Time cross layout (X), with order NW (CW), NE (CCW), SE (CW), SW (CCW) -->
<define name="TYPE" value="QUAD_X"/>
</section>
<command_laws>
<call fun="motor_mixing_run(autopilot_motors_on,FALSE,values)"/>
<set servo="TOP_LEFT" value="motor_mixing.commands[MOTOR_FRONT_LEFT]"/>
<set servo="TOP_RIGHT" value="motor_mixing.commands[MOTOR_FRONT_RIGHT]"/>
<set servo="BOTTOM_RIGHT" value="motor_mixing.commands[MOTOR_BACK_RIGHT]"/>
<set servo="BOTTOM_LEFT" value="motor_mixing.commands[MOTOR_BACK_LEFT]"/>
</command_laws>
<section name="IMU" prefix="IMU_">
<!-- Accelero -->
<define name="ACCEL_X_NEUTRAL" value="2048"/>
<define name="ACCEL_Y_NEUTRAL" value="2048"/>
<define name="ACCEL_Z_NEUTRAL" value="2048"/>
<!-- Magneto calibration -->
<define name="MAG_X_NEUTRAL" value="0"/>
<define name="MAG_Y_NEUTRAL" value="0"/>
<define name="MAG_Z_NEUTRAL" value="-180"/>
<define name="MAG_X_SENS" value="16." integer="16"/>
<define name="MAG_Y_SENS" value="16." integer="16"/>
<define name="MAG_Z_SENS" value="16." integer="16"/>
<!-- Magneto current calibration -->
<define name="MAG_X_CURRENT_COEF" value="0.0"/>
<define name="MAG_Y_CURRENT_COEF" value="0.0"/>
<define name="MAG_Z_CURRENT_COEF" value="0.0"/>
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/>
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/>
</section>
<!-- local magnetic field -->
<!-- http://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Local_Magnetic_Field -->
<section name="AHRS" prefix="AHRS_">
<!-- values used if no GPS fix, on 3D fix is update by geo_mag module -->
<!-- Delft -->
<define name="H_X" value="0.3892503"/>
<define name="H_Y" value="0.0017972"/>
<define name="H_Z" value="0.9211303"/>
</section>
<section name="INS" prefix="INS_">
<define name="SONAR_MAX_RANGE" value="2.2"/>
<define name="SONAR_UPDATE_ON_AGL" value="TRUE"/>
<define name="USE_GPS_ALT" value="TRUE"/>
<define name="VFF_R_GPS" value="0.01"/>
</section>
<section name="STABILIZATION_RATE" prefix="STABILIZATION_RATE_">
<!-- setpoints -->
<define name="SP_MAX_P" value="140" unit="deg/s"/>
<define name="SP_MAX_Q" value="140" unit="deg/s"/>
<define name="SP_MAX_R" value="140" unit="deg/s"/>
<define name="DEADBAND_P" value="20"/>
<define name="DEADBAND_Q" value="20"/>
<define name="DEADBAND_R" value="200"/>
<!-- feedback -->
<define name="GAIN_P" value="400"/>
<define name="GAIN_Q" value="400"/>
<define name="GAIN_R" value="350"/>
<define name="IGAIN_P" value="75"/>
<define name="IGAIN_Q" value="75"/>
<define name="IGAIN_R" value="50"/>
</section>
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
<!-- setpoints -->
<define name="SP_MAX_PHI" value="45" unit="deg"/>
<define name="SP_MAX_THETA" value="45" unit="deg"/>
<define name="SP_MAX_R" value="600" unit="deg/s"/>
<define name="DEADBAND_A" value="0"/>
<define name="DEADBAND_E" value="0"/>
<define name="DEADBAND_R" value="250"/>
<!-- reference -->
<define name="REF_OMEGA_P" value="450" unit="deg/s"/>
<define name="REF_ZETA_P" value="0.9"/>
<define name="REF_MAX_P" value="600." unit="deg/s"/>
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_Q" value="450" unit="deg/s"/>
<define name="REF_ZETA_Q" value="0.9"/>
<define name="REF_MAX_Q" value="600." unit="deg/s"/>
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_R" value="200" unit="deg/s"/>
<define name="REF_ZETA_R" value="0.9"/>
<define name="REF_MAX_R" value="300." unit="deg/s"/>
<define name="REF_MAX_RDOT" value="RadOfDeg(4000.)"/>
<!-- feedback -->
<define name="PHI_PGAIN" value="850"/>
<define name="PHI_DGAIN" value="425"/>
<define name="PHI_IGAIN" value="0"/>
<define name="THETA_PGAIN" value="850"/>
<define name="THETA_DGAIN" value="425"/>
<define name="THETA_IGAIN" value="0"/>
<define name="PSI_PGAIN" value="1000"/>
<define name="PSI_DGAIN" value="700"/>
<define name="PSI_IGAIN" value="0"/>
<!-- feedforward -->
<define name="PHI_DDGAIN" value="0"/>
<define name="THETA_DDGAIN" value="0"/>
<define name="PSI_DDGAIN" value="100"/>
</section>
<section name="GUIDANCE_V" prefix="GUIDANCE_V_">
<define name="HOVER_KP" value="283"/>
<define name="HOVER_KD" value="82"/>
<define name="HOVER_KI" value="13"/>
<define name="NOMINAL_HOVER_THROTTLE" value="0.655"/>
<define name="ADAPT_THROTTLE_ENABLED" value="FALSE"/>
</section>
<section name="GUIDANCE_H" prefix="GUIDANCE_H_">
<!-- Good weather -->
<define name="MAX_BANK" value="12" unit="deg"/>
<!-- Bad weather -->
<!-- define name="MAX_BANK" value="32" unit="deg"/ -->
<define name="PGAIN" value="79"/>
<define name="DGAIN" value="100"/>
<define name="IGAIN" value="30"/>
</section>
<section name="SIMULATOR" prefix="NPS_">
<define name="ACTUATOR_NAMES" value="nw_motor, ne_motor, se_motor, sw_motor" type="string[]"/>
<define name="JSBSIM_MODEL" value="simple_ardrone2" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_ardrone2.h" type="string"/>
</section>
<section name="AUTOPILOT">
<define name="MODE_STARTUP" value="AP_MODE_NAV"/>
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="MODE_AUTO1" value="AP_MODE_ATTITUDE_Z_HOLD"/>
<define name="MODE_AUTO2" value="AP_MODE_NAV"/>
</section>
<section name="BAT">
<define name="MILLIAMP_AT_FULL_THROTTLE" value="8700"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="9.8" unit="V"/>
<define name="LOW_BAT_LEVEL" value="10.4" unit="V"/>
<define name="MAX_BAT_LEVEL" value="12.4" unit="V"/>
</section>
</airframe>
+8 -8
View File
@@ -37,10 +37,10 @@
<servos driver="Pwm">
<servo name="THROTTLE" no="0" min="1000" neutral="1000" max="2000"/>
<servo name="FRONT" no="1" min="2100" neutral="1500" max="900"/>
<servo name="RIGHTBACK" no="2" min="900" neutral="1500" max="2100"/>
<servo name="LEFTBACK" no="3" min="2100" neutral="1500" max="900"/>
<servo name="TAIL" no="4" min="1100" neutral="1450" max="1800"/>
<servo name="BACK" no="1" min="1050" neutral="1500" max="1950"/>
<servo name="LEFTFRONT" no="2" min="1050" neutral="1500" max="1950"/>
<servo name="RIGHTFRONT" no="3" min="1950" neutral="1500" max="1050"/>
<servo name="TAIL" no="4" min="1850" neutral="1600" max="1350"/>
</servos>
<commands>
@@ -61,7 +61,7 @@
<section name="MIXING" prefix="SW_MIXING_">
<!-- front left (CW), front right (CCW), back right (CW), back left (CCW) -->
<define name="TYPE" value="H120"/>
<define name="TYPE" value="HR120"/>
<define name="TRIM_ROLL" value="0"/>
<define name="TRIM_PITCH" value="0"/>
<define name="TRIM_COLL" value="0"/>
@@ -71,9 +71,9 @@
<call fun="throttle_curve_run(autopilot_motors_on, values)"/>
<call fun="swashplate_mixing_run(values)"/>
<set servo="THROTTLE" value="throttle_curve.throttle"/>
<set servo="FRONT" value="swashplate_mixing.commands[SW_FRONT]"/>
<set servo="RIGHTBACK" value="swashplate_mixing.commands[SW_RIGHTBACK]"/>
<set servo="LEFTBACK" value="swashplate_mixing.commands[SW_LEFTBACK]"/>
<set servo="BACK" value="swashplate_mixing.commands[SW_BACK]"/>
<set servo="LEFTFRONT" value="swashplate_mixing.commands[SW_LEFTFRONT]"/>
<set servo="RIGHTFRONT" value="swashplate_mixing.commands[SW_RIGHTFRONT]"/>
<set servo="TAIL" value="@YAW + throttle_curve.throttle*2800/7000"/>
</command_laws>
+1 -1
View File
@@ -180,7 +180,7 @@
<module name="imu" type="analog">
<configure name="GYRO_P" value="ADC_3"/>
</module>
<module name="gps" type="ublox_utm"/>
<module name="gps" type="ublox"/>
<module name="infrared_adc"/>
<module name="ahrs" type="infrared"/>
<module name="ins" type="alt_float"/>
@@ -21,10 +21,10 @@
<subsystem name="telemetry" type="transparent"/>
<!-- Sensors -->
<subsystem name="imu" type="xsens">
<configure name="XSENS_UART_NR" value="3"/>
<configure name="XSENS_UART_BAUD" value="B115200"/>
</subsystem>
<module name="imu" type="xsens">
<configure name="XSENS_PORT" value="uart3"/>
<configure name="XSENS_BAUD" value="B115200"/>
</module>
<subsystem name="ahrs" type="int_cmpl_quat"/>
<subsystem name="gps" type="ublox"/>
<subsystem name="control"/>
@@ -21,10 +21,10 @@
<subsystem name="telemetry" type="transparent"/>
<!-- Sensors -->
<subsystem name="ins" type="xsens">
<configure name="XSENS_UART_NR" value="3"/>
<configure name="XSENS_UART_BAUD" value="B115200"/>
</subsystem>
<module name="ins" type="xsens">
<configure name="XSENS_PORT" value="uart3"/>
<configure name="XSENS_BAUD" value="B115200"/>
</module>
<subsystem name="control"/>
<subsystem name="navigation"/>
@@ -1,3 +1 @@
include $(CFG_SHARED)/gps_ublox.makefile
$(info Please replace <subsystem name="gps" type="ublox_utm"/> with <subsystem name="gps" type="ublox"/>)
$(error Please replace <subsystem name="gps" type="ublox_utm"/> with <module name="gps" type="ublox"/>)
@@ -1,68 +1 @@
# Hey Emacs, this is a -*- makefile -*-
# XSens Mti just providing IMU measurements
# <subsystem name="imu" type="xsens">
# <configure name="XSENS_UART_NR" value="0"/>
# <configure name="XSENS_UART_BAUD" value="B115200"/>
# </subsystem>
#
# <section name="IMU" prefix="IMU_">
# <define name="GYRO_P_SIGN" value="1"/>
# <define name="GYRO_Q_SIGN" value="1"/>
# <define name="GYRO_R_SIGN" value="1"/>
#
# <define name="GYRO_P_NEUTRAL" value="0"/>
# <define name="GYRO_R_NEUTRAL" value="0"/>
# <define name="GYRO_Q_NEUTRAL" value="0"/>
#
# <define name="GYRO_P_SENS" value="1" integer="16"/>
# <define name="GYRO_R_SENS" value="1" integer="16"/>
# <define name="GYRO_Q_SENS" value="1" integer="16"/>
#
# <define name="ACCEL_X_SIGN" value="1"/>
# <define name="ACCEL_Y_SIGN" value="1"/>
# <define name="ACCEL_Z_SIGN" value="1"/>
#
# <define name="ACCEL_X_SENS" value="1" integer="16"/>
# <define name="ACCEL_Z_SENS" value="1" integer="16"/>
# <define name="ACCEL_Y_SENS" value="1" integer="16"/>
#
# <define name="ACCEL_X_NEUTRAL" value="0"/>
# <define name="ACCEL_Z_NEUTRAL" value="0"/>
# <define name="ACCEL_Y_NEUTRAL" value="0"/>
#
# <define name="MAG_X_SIGN" value="1"/>
# <define name="MAG_Y_SIGN" value="1"/>
# <define name="MAG_Z_SIGN" value="1"/>
#
# <define name="MAG_X_NEUTRAL" value="-45"/>
# <define name="MAG_Y_NEUTRAL" value="334"/>
# <define name="MAG_Z_NEUTRAL" value="7"/>
#
# <define name="MAG_X_SENS" value="4.47647816128" integer="16"/>
# <define name="MAG_Y_SENS" value="4.71085671542" integer="16"/>
# <define name="MAG_Z_SENS" value="4.41585354498" integer="16"/>
#
# <define name="BODY_TO_IMU_PHI" value="0" unit="deg"/>
# <define name="BODY_TO_IMU_THETA" value="0" unit="deg"/>
# <define name="BODY_TO_IMU_PSI" value="0" unit="deg"/>
# </section>
#########################################
## IMU
ap.CFLAGS += -DUSE_IMU
ap.CFLAGS += -DIMU_TYPE_H=\"modules/ins/ins_xsens.h\"
ap.srcs += $(SRC_MODULES)/ins/ins_xsens.c
ap.srcs += $(SRC_SUBSYSTEMS)/imu.c
ifndef XSENS_UART_BAUD
XSENS_UART_BAUD = B115200
endif
ap.CFLAGS += -DUSE_UART$(XSENS_UART_NR)
ap.CFLAGS += -DINS_LINK=uart$(XSENS_UART_NR)
ap.CFLAGS += -DUART$(XSENS_UART_NR)_BAUD=$(XSENS_UART_BAUD)
ap.CFLAGS += -DXSENS_OUTPUT_MODE=0x1836
$(error Error: The imu xsens subsystem has been converted to a module, replace <subsystem name="imu" type="xsens"/> by <module name="imu" type="xsens"/>)
@@ -1,70 +1 @@
# Hey Emacs, this is a -*- makefile -*-
# XSens Mti-G
# <subsystem name="ins" type="xsens">
# <configure name="XSENS_UART_NR" value="0"/>
# <configure name="XSENS_UART_BAUD" value="B115200"/>
# </subsystem>
#########################################
## ATTITUDE
ap.CFLAGS += -DUSE_INS_MODULE
# AHRS Results
ap.CFLAGS += -DINS_TYPE_H=\"modules/ins/ins_xsens.h\"
ifndef XSENS_UART_BAUD
XSENS_UART_BAUD = B115200
endif
#B230400
#B115200
ap.CFLAGS += -DUSE_UART$(XSENS_UART_NR)
ap.CFLAGS += -DINS_LINK=uart$(XSENS_UART_NR)
ap.CFLAGS += -DUART$(XSENS_UART_NR)_BAUD=$(XSENS_UART_BAUD)
ap.CFLAGS += -DXSENS_OUTPUT_MODE=0x1836
ap.srcs += $(SRC_SUBSYSTEMS)/ins.c
ap.srcs += $(SRC_MODULES)/ins/ins_xsens.c
ap.CFLAGS += -DAHRS_TRIGGERED_ATTITUDE_LOOP
#########################################
## GPS
ap.CFLAGS += -DUSE_GPS_XSENS
ap.CFLAGS += -DUSE_GPS_XSENS_RAW_DATA
ap.CFLAGS += -DGPS_NB_CHANNELS=16
ap.CFLAGS += -DUSE_GPS
ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_xsens.h\"
ap.srcs += $(SRC_SUBSYSTEMS)/gps.c
#########################################
## Simulator
SIM_TARGETS = sim nps
ifneq (,$(findstring $(TARGET),$(SIM_TARGETS)))
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
$(TARGET).CFLAGS += -DUSE_AHRS
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ahrs.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins.c
$(TARGET).CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_gps_passthrough_utm.h\"
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_gps_passthrough_utm.c
$(TARGET).CFLAGS += -DUSE_GPS
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps/gps_sim.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps.c
endif
$(error Error: The ins xsens subsystem has been converted to a module, replace <subsystem name="ins" type="xsens"/> by <module name="ins" type="xsens"/>)
@@ -1,64 +1 @@
# Hey Emacs, this is a -*- makefile -*-
# XSens Mti-G
# <subsystem name="ins" type="xsens700">
# <configure name="XSENS_UART_NR" value="0"/>
# <configure name="XSENS_UART_BAUD" value="B115200"/>
# </subsystem>
#########################################
## ATTITUDE
ap.CFLAGS += -DUSE_INS_MODULE
# AHRS Results
ap.CFLAGS += -DINS_TYPE_H=\"modules/ins/ins_xsens.h\"
ifndef XSENS_UART_BAUD
XSENS_UART_BAUD = B115200
endif
ap.CFLAGS += -DUSE_UART$(XSENS_UART_NR)
ap.CFLAGS += -DINS_LINK=uart$(XSENS_UART_NR)
ap.CFLAGS += -DUART$(XSENS_UART_NR)_BAUD=$(XSENS_UART_BAUD)
ap.CFLAGS += -DXSENS_OUTPUT_MODE=0x1836
ap.srcs += $(SRC_SUBSYSTEMS)/ins.c
ap.srcs += $(SRC_MODULES)/ins/ins_xsens700.c
ap.CFLAGS += -DAHRS_TRIGGERED_ATTITUDE_LOOP
#########################################
## GPS
ap.CFLAGS += -DUSE_GPS_XSENS
ap.CFLAGS += -DGPS_NB_CHANNELS=50
ap.CFLAGS += -DUSE_GPS
ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_xsens.h\"
ap.srcs += $(SRC_SUBSYSTEMS)/gps.c
#########################################
## Simulator
SIM_TARGETS = sim nps
ifneq (,$(findstring $(TARGET),$(SIM_TARGETS)))
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
$(TARGET).CFLAGS += -DUSE_AHRS
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ahrs.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins.c
$(TARGET).CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_gps_passthrough_utm.h\"
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_gps_passthrough_utm.c
$(TARGET).CFLAGS += -DUSE_GPS
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps/gps_sim.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps.c
endif
$(error Error: The ins xsens700 subsystem has been converted to a module, replace <subsystem name="ins" type="xsens700"/> by <module name="ins" type="xsens700"/>)
-123
View File
@@ -1,123 +0,0 @@
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="2.8" ground_alt="0" lat0="51.990634" lon0="4.376789" max_dist_from_home="8" name="hb_cyberzoo" security_height="2.7">
<header>
#include "autopilot.h"
#include "subsystems/ahrs.h"
#include "subsystems/electrical.h"
#include "subsystems/datalink/datalink.h"
</header>
<waypoints>
<waypoint height="0" name="HOME" x="0.0" y="0.0"/>
<waypoint height="5" name="CLIMB" x="1.2" y="-0.6"/>
<waypoint height="1.342321" name="STDBY" x="-0.7" y="-0.8"/>
<waypoint name="TD" x="0.8" y="-1.7"/>
<waypoint name="p1" x="3.1" y="-1.9"/>
<waypoint name="p2" x="2.5" y="-2.2"/>
<waypoint name="p3" x="1.7" y="-1.6"/>
<waypoint name="p4" x="1.7" y="-3.0"/>
<waypoint name="CAM" x="-2" y="-4" height="2."/>
<waypoint lat="51.9906213" lon="4.3768628" name="_CZ1"/>
<waypoint lat="51.9905874" lon="4.3767766" name="_CZ2"/>
<waypoint lat="51.9906409" lon="4.3767226" name="_CZ3"/>
<waypoint lat="51.990667" lon="4.376806" name="_CZ4"/>
<waypoint lat="51.990624" lon="4.376845" name="_OZ1"/>
<waypoint lat="51.990601" lon="4.376782" name="_OZ2"/>
<waypoint alt="11.5" lat="51.990638" lon="4.376748" name="_OZ3"/>
<waypoint lat="51.990657" lon="4.376804" name="_OZ4"/>
</waypoints>
<sectors>
<sector color="red" name="CyberZoo">
<corner name="_CZ1"/>
<corner name="_CZ2"/>
<corner name="_CZ3"/>
<corner name="_CZ4"/>
</sector>
<sector color="#FF9922" name="ObstacleZone">
<corner name="_OZ1"/>
<corner name="_OZ2"/>
<corner name="_OZ3"/>
<corner name="_OZ4"/>
</sector>
</sectors>
<exceptions>
<exception cond="!InsideCyberZoo(GetPosX(), GetPosY())" deroute="Standby"/>
<!-- <exception cond="datalink_time > 2" deroute="Land here"/>
<exception cond="electrical.bat_low && !(nav_block == IndexOfBlock('Land')) && !(nav_block == IndexOfBlock('Flare')) && !(nav_block == IndexOfBlock('Landed'))" deroute="Land"/>
<exception cond="electrical.bat_critical && !(nav_block == IndexOfBlock('Land')) && !(nav_block == IndexOfBlock('Flare')) && !(nav_block == IndexOfBlock('Landed'))" deroute="Land here"/> -->
</exceptions>
<blocks>
<block name="Wait GPS">
<call fun="NavKillThrottle()"/>
<while cond="!GpsFixValid()"/>
</block>
<block name="Geo init">
<while cond="LessThan(NavBlockTime(), 2)"/>
<!-- <call fun="NavSetAltitudeReferenceHere()"/> -->
<call fun="NavSetGroundReferenceHere()"/>
</block>
<block name="Holding point">
<call fun="NavKillThrottle()"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
<block key="r" name="Start Engine">
<call fun="NavResurrect()"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
<block key="t" name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
<exception cond="stateGetPositionEnu_f()->z > 2.8" deroute="Standby"/>
<call fun="NavSetWaypointHere(WP_CLIMB)"/>
<stay climb="nav_climb_vspeed" vmode="climb" wp="CLIMB"/>
</block>
<block key="s" name="Standby" strip_button="Standby" strip_icon="home.png">
<call fun="NavSetWaypointHere(WP_STDBY)"/>
<stay wp="STDBY"/>
</block>
<block name="stay_p1">
<stay wp="p1"/>
</block>
<block name="go_p2">
<call fun="nav_set_heading_deg(90)"/>
<go wp="p2"/>
<deroute block="stay_p1"/>
</block>
<block name="line_p1_p2">
<go from="p1" hmode="route" wp="p2"/>
<stay wp="p2" until="stage_time>10"/>
<go from="p2" hmode="route" wp="p1"/>
<deroute block="stay_p1"/>
</block>
<block name="route">
<go from="p1" hmode="route" wp="p3"/>
<go from="p3" hmode="route" wp="p4"/>
<go from="p4" hmode="route" wp="p1"/>
<deroute block="stay_p1"/>
</block>
<block name="test yaw">
<go wp="p1"/>
<for var="i" from="1" to="16">
<heading alt="WaypointAlt(WP_p1)" course="90 * $i" until="stage_time > 3"/>
</for>
<deroute block="Standby"/>
</block>
<block name="circle CAM" pre_call="nav_set_heading_towards_waypoint(WP_CAM)">
<circle radius="nav_radius" wp="CAM"/>
</block>
<block key="l" name="Land here" strip_button="Land Here" strip_icon="land-right.png">
<call fun="NavSetWaypointHere(WP_TD)"/>
</block>
<block name="Land">
<go wp="TD"/>
</block>
<block name="Flare">
<exception cond="NavDetectGround()" deroute="Holding point"/>
<exception cond="!nav_is_in_flight()" deroute="Landed"/>
<call fun="NavStartDetectGround()"/>
<stay climb="nav_descend_vspeed" vmode="climb" wp="TD"/>
</block>
<block name="Landed">
<call fun="NavKillThrottle()"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
</blocks>
</flight_plan>
+3
View File
@@ -61,6 +61,9 @@
<go from="p4" hmode="route" wp="p1"/>
<deroute block="stay_p1"/>
</block>
<block name="Oval">
<oval p1="p1" p2="p2" radius="-1"/>
</block>
<block name="test yaw">
<go wp="p1"/>
<for var="i" from="1" to="16">
@@ -74,6 +74,9 @@
<go from="p4" hmode="route" wp="p1"/>
<deroute block="stay_p1"/>
</block>
<block name="Oval">
<oval p1="p1" p2="p2" radius="-1"/>
</block>
<block name="land here" strip_button="Land Here" strip_icon="land-right.png">
<call fun="NavSetWaypointHere(WP_TD)"/>
</block>
-21
View File
@@ -1,21 +0,0 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_i2c" dir="gps">
<doc>
<description>
U-blox GPS (I2C)
(apparently currently broken)
</description>
</doc>
<header>
<file name="gps_i2c.h"/>
</header>
<init fun="gps_i2c_init()"/>
<periodic fun="gps_i2c_periodic()" freq="4." delay="4" autorun="TRUE"/>
<event fun="gps_i2cEvent()"/>
<makefile target="ap">
<file name="gps_i2c.c"/>
<define name="GPS_CONFIGURE" />
</makefile>
</module>
+30
View File
@@ -0,0 +1,30 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_ubx_i2c" dir="gps">
<doc>
<description>
U-blox GPS (I2C)
</description>
<configure name="GPS_UBX_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c1)"/>
</doc>
<depends>gps_ublox</depends>
<header>
<file name="gps_ubx_i2c.h"/>
</header>
<init fun="gps_ubx_i2c_init()"/>
<periodic fun="gps_ubx_i2c_periodic()" freq="10."/>
<event fun="GpsUbxi2cEvent()"/>
<makefile>
<configure name="GPS_UBX_I2C_DEV" default="i2c1" case="upper|lower"/>
<define name="USE_$(GPS_UBX_I2C_DEV_UPPER)"/>
<define name="GPS_UBX_I2C_DEV" value="$(GPS_UBX_I2C_DEV_LOWER)"/>
<define name="GPS_I2C"/>
<define name="I2C_BUF_LEN" value="255"/>
<file name="gps_ubx_i2c.c"/>
</makefile>
</module>
+49
View File
@@ -0,0 +1,49 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins_xsens700" dir="ins">
<doc>
<description>
XSens IMU
</description>
<configure name="XSENS_PORT" value="uart1" description="The (uart) port the XSens is connected to"/>
<configure name="XSENS_BAUD" value="B115200" description="UART baud rate"/>
</doc>
<header>
<file name="imu_xsens.h"/>
</header>
<!-- imu init/periodic/event still called explicitly in main -->
<makefile target="ap">
<file name="xsens.c"/>
<file name="xsens_common.c"/>
<file name="imu_xsens.c"/>
<file name="imu.c" dir="subsystems"/>
<configure name="XSENS_PORT" default="uart1" case="upper|lower"/>
<configure name="XSENS_BAUD" default="B115200"/>
<define name="USE_$(XSENS_PORT_UPPER)" value="1"/>
<define name="XSENS_LINK" value="$(XSENS_PORT_LOWER)"/>
<define name="$(XSENS_PORT_UPPER)_BAUD" value="$(XSENS_BAUD)"/>
<!-- TODO: check output mode -->
<define name="XSENS_OUTPUT_MODE" value="0x1836"/>
<raw>
ap.CFLAGS += -DIMU_TYPE_H=\"modules/ins/imu_xsens.h\"
</raw>
</makefile>
<makefile target="sim">
<file name="ahrs.c" dir="subsystems"/>
<file name="ahrs_sim.c" dir="subsystems/ahrs"/>
<define name="USE_AHRS"/>
<raw>
sim.CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
</raw>
</makefile>
<makefile target="nps">
<define name="USE_IMU"/>
<file name="imu_nps.c" dir="subsystems/imu"/>
<raw>
nps.CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_nps.h\"
</raw>
</makefile>
</module>
+67 -6
View File
@@ -1,16 +1,77 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins">
<module name="ins_xsens" dir="ins">
<doc>
<description>XSens</description>
<description>
XSens Mti-G INS
</description>
<configure name="XSENS_PORT" value="uart1" description="The (uart) port the XSens is connected to"/>
<configure name="XSENS_BAUD" value="B115200" description="UART baud rate"/>
</doc>
<header>
<file name="ins_module.h"/>
<file name="ins_xsens.h"/>
</header>
<init fun="ins_init()"/>
<periodic fun="ins_periodic()" freq="60"/>
<makefile>
<!-- ins_init is still called explicitly in main -->
<!--init fun="ins_init()"/-->
<periodic fun="xsens_periodic()" freq="60"/>
<event fun="ins_xsens_event()"/>
<makefile target="ap">
<file name="xsens.c"/>
<file name="xsens_common.c"/>
<file name="ins_xsens.c"/>
<file name="ins.c" dir="subsystems"/>
<configure name="XSENS_PORT" default="uart1" case="upper|lower"/>
<configure name="XSENS_BAUD" default="B115200"/>
<define name="USE_$(XSENS_PORT_UPPER)" value="1"/>
<define name="XSENS_LINK" value="$(XSENS_PORT_LOWER)"/>
<define name="$(XSENS_PORT_UPPER)_BAUD" value="$(XSENS_BAUD)"/>
<define name="XSENS_OUTPUT_MODE" value="0x1836"/>
<define name="AHRS_TRIGGERED_ATTITUDE_LOOP"/>
<file name="gps.c" dir="subsystems"/>
<define name="USE_GPS"/>
<define name="USE_GPS_XSENS"/>
<define name="USE_GPS_XSENS_RAW_DATA"/>
<define name="GPS_NB_CHANNELS" value="16"/>
<raw>
ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_xsens.h\"
</raw>
</makefile>
<makefile target="sim">
<file name="ahrs.c" dir="subsystems"/>
<file name="ahrs_sim.c" dir="subsystems/ahrs"/>
<define name="USE_AHRS"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough_utm.c" dir="subsystems/ins"/>
<file name="gps.c" dir="subsystems"/>
<file name="gps_sim.c" dir="subsystems/gps"/>
<define name="USE_GPS"/>
<raw>
sim.CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
sim.CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_gps_passthrough_utm.h\"
sim.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
</raw>
</makefile>
<makefile target="nps">
<!-- nps dummy ahrs missing -->
<file name="ahrs.c" dir="subsystems"/>
<define name="USE_AHRS"/>
<define name="NPS_BYPASS_AHRS" value="TRUE"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough_utm.c" dir="subsystems/ins"/>
<file name="gps.c" dir="subsystems"/>
<file name="gps_sim_nps.c" dir="subsystems/gps"/>
<define name="USE_GPS"/>
<raw>
nps.CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_gps_passthrough_utm.h\"
nps.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim_nps.h\"
</raw>
</makefile>
</module>
+76
View File
@@ -0,0 +1,76 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins_xsens700" dir="ins">
<doc>
<description>
XSens Mti-G 700 INS
</description>
<configure name="XSENS_PORT" value="uart1" description="The (uart) port the XSens is connected to"/>
<configure name="XSENS_BAUD" value="B115200" description="UART baud rate"/>
</doc>
<header>
<file name="ins_xsens700.h"/>
</header>
<!-- ins_init is still called explicitly in main -->
<!--init fun="ins_init()"/-->
<periodic fun="xsens700_periodic()" freq="60"/>
<event fun="ins_xsens700_event()"/>
<makefile target="ap">
<file name="xsens700.c"/>
<file name="xsens_common.c"/>
<file name="ins_xsens700.c"/>
<file name="ins.c" dir="subsystems"/>
<configure name="XSENS_PORT" default="uart1" case="upper|lower"/>
<configure name="XSENS_BAUD" default="B115200"/>
<define name="USE_$(XSENS_PORT_UPPER)" value="1"/>
<define name="XSENS_LINK" value="$(XSENS_PORT_LOWER)"/>
<define name="$(XSENS_PORT_UPPER)_BAUD" value="$(XSENS_BAUD)"/>
<define name="XSENS_OUTPUT_MODE" value="0x1836"/>
<define name="AHRS_TRIGGERED_ATTITUDE_LOOP"/>
<file name="gps.c" dir="subsystems"/>
<define name="USE_GPS"/>
<define name="USE_GPS_XSENS"/>
<define name="GPS_NB_CHANNELS" value="50"/>
<raw>
ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_xsens700.h\"
</raw>
</makefile>
<makefile target="sim">
<file name="ahrs.c" dir="subsystems"/>
<file name="ahrs_sim.c" dir="subsystems/ahrs"/>
<define name="USE_AHRS"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough_utm.c" dir="subsystems/ins"/>
<file name="gps.c" dir="subsystems"/>
<file name="gps_sim.c" dir="subsystems/gps"/>
<define name="USE_GPS"/>
<raw>
sim.CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\"
sim.CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_gps_passthrough_utm.h\"
sim.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
</raw>
</makefile>
<makefile target="nps">
<!-- nps dummy ahrs missing -->
<file name="ahrs.c" dir="subsystems"/>
<define name="USE_AHRS"/>
<define name="NPS_BYPASS_AHRS" value="TRUE"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough_utm.c" dir="subsystems/ins"/>
<file name="gps.c" dir="subsystems"/>
<file name="gps_sim_nps.c" dir="subsystems/gps"/>
<define name="USE_GPS"/>
<raw>
nps.CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_gps_passthrough_utm.h\"
nps.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim_nps.h\"
</raw>
</makefile>
</module>
-26
View File
@@ -1,26 +0,0 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins">
<doc>
<description>XSens MTiG</description>
</doc>
<!-- <conflicts>ins</conflicts> -->
<!-- <requires>gps_xsens</requires> -->
<header>
<file name="ins_module.h"/>
</header>
<init fun="ins_init()"/>
<periodic fun="ins_periodic()" freq="60"/>
<makefile>
<define name="USE_UART0" value="1"/>
<define name="INS_LINK" value="UART0"/>
<define name="UART0_BAUD" value="B115200"/>
<define name="USE_GPS_XSENS"/>
<!-- calibrated, orientation, position, velocity, status -->
<define name="XSENS_OUTPUT_MODE" value="0x0836"/>
<!-- timestamp, euler, acc, rate, mag, float, no aux, NED -->
<define name="XSENS_OUTPUT_SETTINGS" value="0x80000C05"/>
<file name="ins_xsens.c"/>
</makefile>
</module>
-24
View File
@@ -1,24 +0,0 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins">
<doc>
<description>XSens MTi</description>
</doc>
<!-- <conflicts>ins</conflicts> -->
<header>
<file name="ins_module.h"/>
</header>
<init fun="ins_init()"/>
<periodic fun="ins_periodic()" freq="60"/>
<makefile>
<define name="USE_UART0" value="1"/>
<define name="INS_LINK" value="UART0"/>
<define name="UART0_BAUD" value="B115200"/>
<!-- calibrated, orientation, status -->
<define name="XSENS_OUTPUT_MODE" value="0x0806"/>
<!-- timestamp, euler, acc, rate, mag, float, no aux, NED -->
<define name="XSENS_OUTPUT_SETTINGS" value="0x80000C05"/>
<file name="ins_xsens.c"/>
</makefile>
</module>
+2 -4
View File
@@ -17,10 +17,8 @@
<init fun="init_usb_serial()"/>
<event fun="event_usb_serial()"/>
<makefile target="ap">
<raw>
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
</raw>
<makefile target="!nps|sim">
<file_arch name="usb_ser_hw.c" dir=""/>
<define name="USE_USB_SERIAL"/>
<file name="usb_serial_stm32_example1.c"/>
</makefile>
+14 -16
View File
@@ -1,17 +1,17 @@
<!DOCTYPE module SYSTEM "module.dtd">
<!DOCTYPE module SYSTEM "module.dtd">
<module name="usb_serial_stm32_example1" dir="com">
<module name="usb_serial_stm32_example1" dir="com">
<doc>
<description>
STM32 USB-serial example.
Example of USB-serial module on STM32 architecture, using libopencm3 library.
This example tests the capability of USB-serial port by sending a lots of data.
To be used with Lisa M/MX 2.1
</description>
<description>
STM32 USB-serial example.
Example of USB-serial module on STM32 architecture, using libopencm3 library.
This example tests the capability of USB-serial port by sending a lots of data.
To be used with Lisa M/MX 2.1
</description>
</doc>
<header>
<file name="usb_serial_stm32.h"/>
<file name="usb_serial_stm32.h"/>
</header>
<init fun="init_usb_serial()"/>
@@ -20,11 +20,9 @@
<event fun="event_usb_serial()"/>
<makefile target="ap">
<raw>
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
</raw>
<define name="USE_USB_SERIAL"/>
<file name="usb_serial_stm32_example2.c"/>
<makefile target="!nps|sim">
<file_arch name="usb_ser_hw.c" dir=""/>
<define name="USE_USB_SERIAL"/>
<file name="usb_serial_stm32_example2.c"/>
</makefile>
</module>
</module>
+7 -7
View File
@@ -42,14 +42,14 @@ void i2c_setbitrate(struct i2c_periph *p __attribute__((unused)), int bitrate _
{
}
bool_t i2c_idle(struct i2c_periph *p __attribute__((unused)))
bool i2c_idle(struct i2c_periph *p __attribute__((unused)))
{
return TRUE;
return true;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-qual"
bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
bool i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
{
int file = (int)p->reg_addr;
@@ -68,7 +68,7 @@ bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
/* if write failed, increment error counter queue_full_cnt */
p->errors->queue_full_cnt++;
t->status = I2CTransFailed;
return TRUE;
return true;
}
break;
// Just reading
@@ -79,7 +79,7 @@ bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
/* if read failed, increment error counter ack_fail_cnt */
p->errors->ack_fail_cnt++;
t->status = I2CTransFailed;
return TRUE;
return true;
}
break;
// First Transmit and then read with repeated start
@@ -96,7 +96,7 @@ bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
/* if write/read failed, increment error counter miss_start_stop_cnt */
p->errors->miss_start_stop_cnt++;
t->status = I2CTransFailed;
return TRUE;
return true;
}
break;
default:
@@ -105,7 +105,7 @@ bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
// Successfull transfer
t->status = I2CTransSuccess;
return TRUE;
return true;
}
#pragma GCC diagnostic pop
+7 -7
View File
@@ -45,7 +45,7 @@ void spi_init_slaves(void)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-qual"
bool_t spi_submit(struct spi_periph *p, struct spi_transaction *t)
bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
{
int fd = (int)p->reg_addr;
@@ -89,7 +89,7 @@ bool_t spi_submit(struct spi_periph *p, struct spi_transaction *t)
if (ioctl(fd, SPI_IOC_MESSAGE(1), &xfer) < 0) {
t->status = SPITransFailed;
return FALSE;
return false;
}
/* copy recieved data if we had to use an extra rx_buffer */
@@ -98,20 +98,20 @@ bool_t spi_submit(struct spi_periph *p, struct spi_transaction *t)
}
t->status = SPITransSuccess;
return TRUE;
return true;
}
#pragma GCC diagnostic pop
bool_t spi_lock(struct spi_periph *p, uint8_t slave)
bool spi_lock(struct spi_periph *p, uint8_t slave)
{
// not implemented
return FALSE;
return false;
}
bool_t spi_resume(struct spi_periph *p, uint8_t slave)
bool spi_resume(struct spi_periph *p, uint8_t slave)
{
// not implemented
return FALSE;
return false;
}
@@ -136,7 +136,7 @@ static void sys_tick_handler(void)
if (sys_time.timer[i].in_use &&
sys_time.nb_tick >= sys_time.timer[i].end_time) {
sys_time.timer[i].end_time += sys_time.timer[i].duration;
sys_time.timer[i].elapsed = TRUE;
sys_time.timer[i].elapsed = true;
/* call registered callbacks, WARNING: they will be executed in the sys_time thread! */
if (sys_time.timer[i].cb) {
sys_time.timer[i].cb(i);
+1 -1
View File
@@ -66,7 +66,7 @@ void udp_arch_init(void)
* Initialize the UDP peripheral.
* Allocate UdpSocket struct and create and bind the UDP socket.
*/
void udp_arch_periph_init(struct udp_periph *p, char *host, int port_out, int port_in, bool_t broadcast)
void udp_arch_periph_init(struct udp_periph *p, char *host, int port_out, int port_in, bool broadcast)
{
struct UdpSocket *sock = malloc(sizeof(struct UdpSocket));
udp_socket_create(sock, host, port_out, port_in, broadcast);
+1 -1
View File
@@ -46,7 +46,7 @@
* @param[in] broadcast if TRUE enable broadcasting
* @return -1 on error, otherwise 0
*/
int udp_socket_create(struct UdpSocket *sock, char *host, int port_out, int port_in, bool_t broadcast)
int udp_socket_create(struct UdpSocket *sock, char *host, int port_out, int port_in, bool broadcast)
{
if (sock == NULL) {
return -1;
+1 -1
View File
@@ -46,7 +46,7 @@ struct UdpSocket {
* @param[in] broadcast if TRUE enable broadcasting
* @return -1 on error, otherwise 0
*/
extern int udp_socket_create(struct UdpSocket *sock, char *host, int port_out, int port_in, bool_t broadcast);
extern int udp_socket_create(struct UdpSocket *sock, char *host, int port_out, int port_in, bool broadcast);
/**
* Send a packet from buffer, blocking.
+3 -3
View File
@@ -35,7 +35,7 @@
#define ADS8344Select() SetBit(ADS8344_SS_IOCLR,ADS8344_SS_PIN)
#define ADS8344Unselect() SetBit(ADS8344_SS_IOSET,ADS8344_SS_PIN)
bool_t ADS8344_available;
bool ADS8344_available;
uint16_t ADS8344_values[NB_CHANNELS];
#define POWER_MODE (1 << 1 | 1)
@@ -88,7 +88,7 @@ static uint8_t channel;
void ADS8344_init(void)
{
channel = 0;
ADS8344_available = FALSE;
ADS8344_available = false;
/* setup pins for SSP (SCK, MISO, MOSI) */
PINSEL1 |= 2 << 2 | 2 << 4 | 2 << 6;
@@ -146,7 +146,7 @@ void SPI1_ISR(void)
channel++;
if (channel > 7) {
channel = 0;
ADS8344_available = TRUE;
ADS8344_available = true;
}
send_request();
SpiClearRti();
+1 -1
View File
@@ -28,7 +28,7 @@
#define NB_CHANNELS 8
extern uint16_t ADS8344_values[NB_CHANNELS];
extern bool_t ADS8344_available;
extern bool ADS8344_available;
void ADS8344_init(void);
void ADS8344_start(void);
+5 -5
View File
@@ -85,7 +85,7 @@ __attribute__((always_inline)) static inline void I2cSendByte(void *reg, uint8_t
((i2cRegs_t *)reg)->dat = b;
}
__attribute__((always_inline)) static inline void I2cReceive(void *reg, bool_t ack)
__attribute__((always_inline)) static inline void I2cReceive(void *reg, bool ack)
{
if (ack) { ((i2cRegs_t *)reg)->conset = _BV(AA); }
else { ((i2cRegs_t *)reg)->conclr = _BV(AAC); }
@@ -341,12 +341,12 @@ void i2c1_hw_init(void)
#endif /* USE_I2C1 */
bool_t i2c_idle(struct i2c_periph *p)
bool i2c_idle(struct i2c_periph *p)
{
return p->status == I2CIdle;
}
bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
bool i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
{
uint8_t idx;
@@ -356,7 +356,7 @@ bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
/* queue full */
p->errors->queue_full_cnt++;
t->status = I2CTransFailed;
return FALSE;
return false;
}
t->status = I2CTransPending;
@@ -378,7 +378,7 @@ bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
//VICIntEnable = VIC_BIT(*vic);
enableIRQ();
return TRUE;
return true;
}
void i2c_event(void) { }
@@ -89,10 +89,10 @@ void pwm_input_isr1(void)
T0CCR &= ~TCCR_CR3_F;
#if USE_PWM_INPUT1 == PWM_PULSE_TYPE_ACTIVE_HIGH
pwm_input_duty_tics[0] = t_fall - t_rise;
pwm_input_duty_valid[0] = TRUE;
pwm_input_duty_valid[0] = true;
#elif USE_PWM_INPUT1 == PWM_PULSE_TYPE_ACTIVE_LOW
pwm_input_period_tics[0] = t_fall - t_oldfall;
pwm_input_period_valid[0] = TRUE;
pwm_input_period_valid[0] = true;
t_oldfall = t_fall;
#endif //ACTIVE_HIGH
} else if (T0CCR & TCCR_CR3_R) {
@@ -101,10 +101,10 @@ void pwm_input_isr1(void)
T0CCR &= ~TCCR_CR3_R;
#if USE_PWM_INPUT1 == PWM_PULSE_TYPE_ACTIVE_LOW
pwm_input_duty_tics[0] = t_rise - t_fall;
pwm_input_duty_valid[0] = TRUE;
pwm_input_duty_valid[0] = true;
#elif USE_PWM_INPUT1 == PWM_PULSE_TYPE_ACTIVE_HIGH
pwm_input_period_tics[0] = t_rise - t_oldrise;
pwm_input_period_valid[0] = TRUE;
pwm_input_period_valid[0] = true;
t_oldrise = t_rise;
#endif //ACTIVE_LOW
}
@@ -128,10 +128,10 @@ void pwm_input_isr2(void)
T0CCR &= ~TCCR_CR0_F;
#if USE_PWM_INPUT2 == PWM_PULSE_TYPE_ACTIVE_HIGH
pwm_input_duty_tics[1] = t_fall - t_rise;
pwm_input_duty_valid[1] = TRUE;
pwm_input_duty_valid[1] = true;
#elif USE_PWM_INPUT2 == PWM_PULSE_TYPE_ACTIVE_LOW
pwm_input_period_tics[1] = t_fall - t_oldfall;
pwm_input_period_valid[1] = TRUE;
pwm_input_period_valid[1] = true;
t_oldfall = t_fall;
#endif //ACTIVE_HIGH
} else if (T0CCR & TCCR_CR0_R) {
@@ -140,10 +140,10 @@ void pwm_input_isr2(void)
T0CCR &= ~TCCR_CR0_R;
#if USE_PWM_INPUT2 == PWM_PULSE_TYPE_ACTIVE_LOW
pwm_input_duty_tics[1] = t_rise - t_fall;
pwm_input_duty_valid[1] = TRUE;
pwm_input_duty_valid[1] = true;
#elif USE_PWM_INPUT2 == PWM_PULSE_TYPE_ACTIVE_HIGH
pwm_input_period_tics[1] = t_rise - t_oldrise;
pwm_input_period_valid[1] = TRUE;
pwm_input_period_valid[1] = true;
t_oldrise = t_rise;
#endif //ACTIVE_LOW
}
+15 -15
View File
@@ -490,7 +490,7 @@ void spi1_arch_init(void)
#endif
bool_t spi_submit(struct spi_periph *p, struct spi_transaction *t)
bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
{
//unsigned cpsr;
@@ -499,7 +499,7 @@ bool_t spi_submit(struct spi_periph *p, struct spi_transaction *t)
if (idx >= SPI_TRANSACTION_QUEUE_LEN) { idx = 0; }
if (idx == p->trans_extract_idx) {
t->status = SPITransFailed;
return FALSE; /* queue full */
return false; /* queue full */
}
t->status = SPITransPending;
@@ -521,7 +521,7 @@ bool_t spi_submit(struct spi_periph *p, struct spi_transaction *t)
//VICIntEnable = VIC_BIT(*vic);
//restoreIRQ(cpsr); // restore global interrupts
enableIRQ();
return TRUE;
return true;
}
@@ -560,20 +560,20 @@ void spi_slave_unselect(uint8_t slave)
SpiSlaveUnselect(slave);
}
bool_t spi_lock(struct spi_periph *p, uint8_t slave)
bool spi_lock(struct spi_periph *p, uint8_t slave)
{
uint8_t *vic = (uint8_t *)(p->init_struct);
VICIntEnClear = VIC_BIT(*vic);
if (slave < 254 && p->suspend == 0) {
p->suspend = slave + 1; // 0 is reserved for unlock state
VICIntEnable = VIC_BIT(*vic);
return TRUE;
return true;
}
VICIntEnable = VIC_BIT(*vic);
return FALSE;
return false;
}
bool_t spi_resume(struct spi_periph *p, uint8_t slave)
bool spi_resume(struct spi_periph *p, uint8_t slave)
{
uint8_t *vic = (uint8_t *)(p->init_struct);
VICIntEnClear = VIC_BIT(*vic);
@@ -584,10 +584,10 @@ bool_t spi_resume(struct spi_periph *p, uint8_t slave)
SpiStart(p, p->trans[p->trans_extract_idx]);
}
VICIntEnable = VIC_BIT(*vic);
return TRUE;
return true;
}
VICIntEnable = VIC_BIT(*vic);
return FALSE;
return false;
}
#endif /* SPI_MASTER */
@@ -676,12 +676,12 @@ void spi1_slave_arch_init(void)
#endif
/** Register one (and only one) transaction to use spi as slave */
bool_t spi_slave_register(struct spi_periph *p, struct spi_transaction *t)
bool spi_slave_register(struct spi_periph *p, struct spi_transaction *t)
{
if (p->trans_insert_idx >= 1) {
t->status = SPITransFailed;
return FALSE;
return false;
}
t->status = SPITransPending;
p->status = SPIIdle;
@@ -697,18 +697,18 @@ bool_t spi_slave_register(struct spi_periph *p, struct spi_transaction *t)
SpiSetDataSize(p, t->dss);
return TRUE;
return true;
}
bool_t spi_slave_wait(struct spi_periph *p)
bool spi_slave_wait(struct spi_periph *p)
{
if (p->trans_insert_idx == 0) {
// no transaction registered
return FALSE;
return false;
}
// Start waiting
SpiSlaveStart(p, p->trans[p->trans_extract_idx]);
return TRUE;
return true;
}
#endif /* SPI_SLAVE */
@@ -107,7 +107,7 @@ static void SSP_ISR(void) __attribute__((naked));
// Functions for the generic device API
static int spi_slave_hs_check_free_space(struct spi_slave_hs *p __attribute__((unused)), uint8_t len __attribute__((unused)))
{
return TRUE;
return true;
}
static void spi_slave_hs_transmit(struct spi_slave_hs *p __attribute__((unused)), uint8_t byte)
@@ -168,7 +168,7 @@ static inline void sys_tick_irq_handler(void)
if (sys_time.timer[i].in_use &&
sys_time.nb_tick >= sys_time.timer[i].end_time) {
sys_time.timer[i].end_time += sys_time.timer[i].duration;
sys_time.timer[i].elapsed = TRUE;
sys_time.timer[i].elapsed = true;
if (sys_time.timer[i].cb) {
sys_time.timer[i].cb(i);
}
@@ -36,7 +36,7 @@ void TRIG_ISR()
if (msec_of_cpu_ticks(delta_t0_temp) > 10) {
trigger_delta_t0 = delta_t0_temp;
last = trigger_t0;
trigger_ext_valid = TRUE;
trigger_ext_valid = true;
}
}
@@ -52,6 +52,6 @@ void trigger_ext_init(void)
#else
#error "trig_ext_hw.h: Unknown PULSE_TYPE"
#endif
trigger_ext_valid = FALSE;
trigger_ext_valid = false;
}
@@ -7,7 +7,7 @@
uint32_t trigger_t0;
uint32_t delta_t0;
volatile bool_t trig_ext_valid;
volatile bool trig_ext_valid;
void TRIG_ISR()
@@ -19,7 +19,7 @@ void TRIG_ISR()
if (msec_of_cpu_ticks(delta_t0_temp) > 10) {
delta_t0 = delta_t0_temp;
last = trigger_t0;
trig_ext_valid = TRUE;
trig_ext_valid = true;
}
}
@@ -35,6 +35,6 @@ void trig_ext_init(void)
#else
#error "trig_ext_hw.h: Unknown PULSE_TYPE"
#endif
trig_ext_valid = FALSE;
trig_ext_valid = false;
}
@@ -11,7 +11,7 @@
extern uint32_t trigger_t0;
extern uint32_t delta_t0;
extern volatile bool_t trig_ext_valid;
extern volatile bool trig_ext_valid;
void TRIG_ISR(void);
void trig_ext_init(void);
@@ -37,7 +37,7 @@ void exti15_10_irq_handler(void)
// if(EXTI_GetITStatus(EXTI_Line14) != RESET)
// EXTI_ClearITPendingBit(EXTI_Line14);
//imu_aspirin.gyro_eoc = TRUE;
//imu_aspirin.gyro_eoc = true;
//imu_aspirin.status = AspirinStatusReadingGyro;
}
@@ -59,5 +59,5 @@ void exti2_irq_handler(void)
void dma1_c4_irq_handler(void)
{
//imu_aspirin.accel_available = TRUE;
//imu_aspirin.accel_available = true;
}
@@ -114,7 +114,7 @@ void SPI1_ISR(void)
channel++;
if (channel > 7 - 1) {
channel = 0;
ADS8344_available = TRUE;
ADS8344_available = true;
ADS8344Unselect();
} else {
send_request();
@@ -22,7 +22,7 @@
#include "subsystems/radio_control.h"
#include "subsystems/radio_control/spektrum_arch.h"
bool_t rc_spk_parser_status;
bool rc_spk_parser_status;
uint8_t rc_spk_parser_idx;
uint8_t rc_spk_parser_buf[RADIO_CONTROL_NB_CHANNEL * 2];
const int16_t rc_spk_throw[RADIO_CONTROL_NB_CHANNEL] = RC_SPK_THROWS;
@@ -34,7 +34,7 @@
#define RC_SPK_STA_GOT_SYNC_1 1
#define RC_SPK_STA_GOT_SYNC_2 2
extern bool_t rc_spk_parser_status;
extern bool rc_spk_parser_status;
extern uint8_t rc_spk_parser_idx;
extern uint8_t rc_spk_parser_buf[RADIO_CONTROL_NB_CHANNEL * 2];
+1 -1
View File
@@ -406,7 +406,7 @@ int VCOM_getchar(void)
@returns TRUE if len bytes are free
*/
bool_t VCOM_check_free_space(uint8_t len)
bool VCOM_check_free_space(uint8_t len)
{
return (fifo_free(&txfifo) >= len ? TRUE : FALSE);
}
+3 -3
View File
@@ -34,11 +34,11 @@
#if USE_BARO_MS5534A
extern bool_t spi_message_received;
extern bool_t baro_MS5534A_available;
extern bool spi_message_received;
extern bool baro_MS5534A_available;
extern uint32_t baro_MS5534A_pressure;
extern uint16_t baro_MS5534A_temp;
extern bool_t alt_baro_enabled;
extern bool alt_baro_enabled;
extern uint32_t baro_MS5534A_ground_pressure;
extern float baro_MS5534A_r;
extern float baro_MS5534A_sigma2;
+2 -2
View File
@@ -27,8 +27,8 @@
#include "mcu_periph/i2c.h"
bool_t i2c_idle(struct i2c_periph *p __attribute__((unused))) { return TRUE; }
bool_t i2c_submit(struct i2c_periph *p __attribute__((unused)), struct i2c_transaction *t __attribute__((unused))) { return TRUE;}
bool i2c_idle(struct i2c_periph *p __attribute__((unused))) { return true; }
bool i2c_submit(struct i2c_periph *p __attribute__((unused)), struct i2c_transaction *t __attribute__((unused))) { return true;}
void i2c_event(void) { }
void i2c2_setbitrate(int bitrate __attribute__((unused))) { }

Some files were not shown because too many files have changed in this diff Show More