mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-06 02:52:42 +08:00
[modules] move electrical subsystem to module
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="electrical" dir="fbw" task="core">
|
||||
<module name="electrical" dir="energy" task="core">
|
||||
<doc>
|
||||
<description>
|
||||
General electrical interface
|
||||
@@ -11,22 +11,22 @@
|
||||
<provides>electrical</provides>
|
||||
</dep>
|
||||
<header>
|
||||
<file name="electrical.h" dir="subsystems"/>
|
||||
<file name="electrical.h"/>
|
||||
</header>
|
||||
<init fun="electrical_init()"/>
|
||||
<periodic fun="electrical_periodic()" freq="10"/>
|
||||
<makefile target="fbw|sim|nps|hitl" firmware="fixedwing">
|
||||
<file name="electrical.c" dir="subsystems"/>
|
||||
<file name="electrical.c"/>
|
||||
<test firmware="fixedwing"/>
|
||||
</makefile>
|
||||
<makefile target="ap" firmware="fixedwing" cond="ifeq (,$(findstring $(SEPARATE_FBW),0 FALSE))">
|
||||
<file name="electrical.c" dir="subsystems"/>
|
||||
<file name="electrical.c"/>
|
||||
</makefile>
|
||||
<makefile firmware="rotorcraft">
|
||||
<file name="electrical.c" dir="subsystems"/>
|
||||
<file name="electrical.c"/>
|
||||
</makefile>
|
||||
<makefile firmware="rover">
|
||||
<file name="electrical.c" dir="subsystems"/>
|
||||
<file name="electrical.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "subsystems/commands.h"
|
||||
#include "subsystems/actuators.h"
|
||||
//#include "subsystems/electrical.h"
|
||||
//#include "modules/energy/electrical.h"
|
||||
#include "subsystems/datalink/telemetry.h"
|
||||
|
||||
#include "subsystems/settings.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "subsystems/actuators.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "actuators.h"
|
||||
#include "led_hw.h"
|
||||
#include "autopilot.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "subsystems/actuators.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "actuators.h"
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/abi.h"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <linux/input.h>
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
/**
|
||||
* Battery reading thread
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
// FIXME, move to control
|
||||
#define LATERAL_MODE_MANUAL 0
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "mcu_periph/sys_time.h"
|
||||
#include "subsystems/commands.h"
|
||||
#include "subsystems/actuators.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "autopilot.h"
|
||||
#include "paparazzi.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
//#include "mcu_periph/sys_time.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/datalink/telemetry.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "subsystems/commands.h"
|
||||
#include "subsystems/actuators.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/settings.h"
|
||||
#include "firmwares/rotorcraft/navigation.h"
|
||||
#include "firmwares/rotorcraft/guidance.h"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "subsystems/actuators/motor_mixing.h"
|
||||
#endif
|
||||
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "subsystems/intermcu/intermcu_fbw.h"
|
||||
#include "firmwares/rotorcraft/main_fbw.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "generated/modules.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/datalink/telemetry.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "pprz_mutex.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "firmwares/fixedwing/main_fbw.h"
|
||||
|
||||
/** FIXME dummy definition for compat with rotorcraft **/
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
#include "std.h"
|
||||
#include "mcu_periph/i2c.h"
|
||||
#include "mcu_periph/sys_time.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
// revision information
|
||||
#if BATTERY_MONITOR_REV4
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "subsystems/imu.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
#include "pprzlink/messages.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "state.h"
|
||||
#include "subsystems/gps.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "inter_mcu.h"
|
||||
#include "autopilot.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "state.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "firmwares/rotorcraft/stabilization.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
#ifndef WINDTUNNEL_TO_BODY_PHI
|
||||
#define WINDTUNNEL_TO_BODY_PHI 0
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "subsystems/abi.h"
|
||||
#include "firmwares/rotorcraft/stabilization.h"
|
||||
#include "firmwares/rotorcraft/stabilization/stabilization_attitude.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "subsystems/datalink/telemetry.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "modules/datalink/bitcraze/syslink_dl.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include <string.h>
|
||||
#include "led.h"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "generated/settings.h"
|
||||
|
||||
#include "mcu_periph/sys_time.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "state.h"
|
||||
#include "pprz_version.h"
|
||||
#include "autopilot.h"
|
||||
@@ -768,7 +768,7 @@ static void mavlink_send_rc_channels(struct transport_tx *trans, struct link_dev
|
||||
MAVLinkSendMessage();
|
||||
}
|
||||
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
static void mavlink_send_battery_status(struct transport_tx *trans, struct link_device *dev)
|
||||
{
|
||||
static uint16_t voltages[10];
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "generated/flight_plan.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "state.h"
|
||||
|
||||
// for GetPosAlt, include correct header until we have unified API
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "modules/energy/bat_checker.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "generated/modules.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "mcu_periph/gpio.h"
|
||||
#include "led.h"
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file subsystems/electrical.c
|
||||
* @file modules/energy/electrical.c
|
||||
*
|
||||
* Implemnetation for electrical status: supply voltage, current, battery status, etc.
|
||||
*/
|
||||
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
#include "mcu_periph/adc.h"
|
||||
#include "subsystems/commands.h"
|
||||
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file subsystems/electrical.h
|
||||
* @file modules/energy/electrical.h
|
||||
*
|
||||
* Interface for electrical status: supply voltage, current, battery status, etc.
|
||||
*/
|
||||
|
||||
#ifndef SUBSYSTEMS_ELECTRICAL_H
|
||||
#define SUBSYSTEMS_ELECTRICAL_H
|
||||
#ifndef ELECTRICAL_H
|
||||
#define ELECTRICAL_H
|
||||
|
||||
#include "std.h"
|
||||
#include "generated/airframe.h"
|
||||
@@ -55,4 +55,4 @@ extern struct Electrical electrical;
|
||||
extern void electrical_init(void);
|
||||
extern void electrical_periodic(void);
|
||||
|
||||
#endif /* SUBSYSTEMS_ELECTRICAL_H */
|
||||
#endif /* ELECTRICAL_H */
|
||||
@@ -61,7 +61,7 @@ Receiving:
|
||||
#include "subsystems/datalink/downlink.h"
|
||||
#include "subsystems/gps.h"
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
//#include "subsystems/navigation/common_nav.h" //why is should this be needed?
|
||||
#include "generated/settings.h"
|
||||
#include "led.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef HOTT_EAM_H
|
||||
#define HOTT_EAM_H
|
||||
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/imu.h"
|
||||
#include "autopilot.h"
|
||||
#include "state.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "led.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "autopilot.h"
|
||||
#include "autopilot_rc_helpers.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/datalink/downlink.h"
|
||||
#include "subsystems/datalink/telemetry.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "std.h"
|
||||
//#include "modules/read_matrix_serial/read_matrix_serial.h"
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <math.h>
|
||||
#include "mcu_periph/i2c_smbus.h"
|
||||
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
void electrical_ardrone2_setup(void);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "sensors/ezcurrent.h"
|
||||
#include "mcu_periph/i2c.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
#define EZCURRENT_ADDR 0xEF
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "modules/sensors/rpm_sensor.h"
|
||||
#include "mcu_periph/pwm_input.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "subsystems/abi.h"
|
||||
#include "filters/low_pass_filter.h"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "actuators_uavcan.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "math/pprz_random.h"
|
||||
|
||||
/* By default enable the usage of the current sensing in the ESC telemetry */
|
||||
|
||||
@@ -228,7 +228,7 @@ void WEAK imu_scale_accel(struct Imu *_imu)
|
||||
}
|
||||
|
||||
#if !defined SITL && defined IMU_MAG_X_CURRENT_COEF && defined IMU_MAG_Y_CURRENT_COEF && defined IMU_MAG_Z_CURRENT_COEF
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
void WEAK imu_scale_mag(struct Imu *_imu)
|
||||
{
|
||||
struct Int32Vect3 mag_correction;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "autopilot.h"
|
||||
|
||||
#if COMMANDS_NB > 8
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "subsystems/intermcu.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
void intermcu_set_actuators(pprz_t *command_values, uint8_t ap_mode);
|
||||
void RadioControlEvent(void (*frame_handler)(void));
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "intermcu_fbw.h"
|
||||
#include "pprzlink/intermcu_msg.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "modules/telemetry/telemetry_intermcu.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "mcu_periph/adc.h"
|
||||
#include "mcu_periph/gpio.h"
|
||||
#include "mcu_periph/sys_time.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "nps_electrical.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "subsystems/electrical.h"
|
||||
#include "modules/energy/electrical.h"
|
||||
|
||||
struct NpsElectrical nps_electrical;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user