mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 09:06:11 +00:00
Make channels definition to rc.ino
It's also planned to parametrize them later
This commit is contained in:
@@ -17,7 +17,7 @@ float t = NAN;
|
||||
float dt;
|
||||
float motors[4];
|
||||
int16_t channels[16]; // raw rc channels
|
||||
float controls[RC_CHANNELS];
|
||||
float controls[16];
|
||||
float controlsTime;
|
||||
Vector acc;
|
||||
Vector gyro;
|
||||
|
@@ -7,13 +7,6 @@
|
||||
#include <gazebo/gazebo.hh>
|
||||
#include <iostream>
|
||||
|
||||
#define RC_CHANNEL_ROLL 0
|
||||
#define RC_CHANNEL_PITCH 1
|
||||
#define RC_CHANNEL_THROTTLE 2
|
||||
#define RC_CHANNEL_YAW 3
|
||||
#define RC_CHANNEL_ARMED 5
|
||||
#define RC_CHANNEL_MODE 4
|
||||
|
||||
SDL_Joystick *joystick;
|
||||
|
||||
bool joystickInit() {
|
||||
|
@@ -72,8 +72,8 @@ public:
|
||||
|
||||
// read rc
|
||||
readRC();
|
||||
controls[RC_CHANNEL_MODE] = 1; // 0 acro, 1 stab
|
||||
controls[RC_CHANNEL_ARMED] = 1; // armed
|
||||
controls[modeChannel] = 1; // 0 acro, 1 stab
|
||||
controls[armedChannel] = 1; // armed
|
||||
|
||||
estimate();
|
||||
|
||||
|
Reference in New Issue
Block a user