Skip to content

Commit

Permalink
Blimp & AP_Motors: Add AP_Motors class for blimp.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleRos committed Aug 24, 2023
1 parent 50733fc commit e4c7446
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 749 deletions.
3 changes: 2 additions & 1 deletion Blimp/Blimp.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <AC_PID/AC_PID_Basic.h>
#include <AC_PID/AC_PID.h>
#include <AP_Vehicle/AP_MultiCopter.h>
#include <AP_Motors/AP_Motors.h> // AP Motors library

#include <Filter/NotchFilter.h>

Expand Down Expand Up @@ -193,7 +194,7 @@ class Blimp : public AP_Vehicle
}

// Motor Output
Fins *motors;
AP_MotorsBlimp *motors;
Loiter *loiter;

int32_t _home_bearing;
Expand Down
5 changes: 4 additions & 1 deletion Blimp/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ const char* Blimp::get_frame_string()
*/
void Blimp::allocate_motors(void)
{
switch ((Fins::motor_frame_class)g2.frame_class.get()) {
switch ((AP_Motors::motor_frame_class)g2.frame_class.get()) {
case AP_MotorsBlimp::MOTOR_FRAME_BLIMP:
motors = new AP_MotorsBlimp();
break;
case Fins::MOTOR_FRAME_FISHBLIMP:
default:
motors = new Fins(blimp.scheduler.get_loop_rate_hz());
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Motors/AP_Motors.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
#include "AP_Motors6DOF.h"
#include "AP_MotorsMatrix_6DoF_Scripting.h"
#include "AP_MotorsMatrix_Scripting_Dynamic.h"
#include "AP_MotorsBlimp.h"
Loading

0 comments on commit e4c7446

Please sign in to comment.