mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
Fix simulator run
Add missing extern variables. Fix warning.
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ void sendMavlink() {
|
|||||||
MAV_VTOL_STATE_UNDEFINED, landed ? MAV_LANDED_STATE_ON_GROUND : MAV_LANDED_STATE_IN_AIR);
|
MAV_VTOL_STATE_UNDEFINED, landed ? MAV_LANDED_STATE_ON_GROUND : MAV_LANDED_STATE_IN_AIR);
|
||||||
sendMessage(&msg);
|
sendMessage(&msg);
|
||||||
|
|
||||||
uint16_t voltages[] = {voltage * 1000, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX};
|
uint16_t voltages[] = {(uint16_t)(voltage * 1000), UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX};
|
||||||
uint16_t voltagesExt[] = {0, 0, 0, 0};
|
uint16_t voltagesExt[] = {0, 0, 0, 0};
|
||||||
float remaining = constrain(mapf(voltage, 3.4, 4.2, 0, 1), 0, 1);
|
float remaining = constrain(mapf(voltage, 3.4, 4.2, 0, 1), 0, 1);
|
||||||
mavlink_msg_battery_status_pack(mavlinkSysId, MAV_COMP_ID_AUTOPILOT1, &msg, 0, MAV_BATTERY_FUNCTION_ALL,
|
mavlink_msg_battery_status_pack(mavlinkSysId, MAV_COMP_ID_AUTOPILOT1, &msg, 0, MAV_BATTERY_FUNCTION_ALL,
|
||||||
|
|||||||
+6
-1
@@ -11,7 +11,12 @@
|
|||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <gazebo/gazebo.hh>
|
#include <gazebo/gazebo.hh>
|
||||||
|
|
||||||
int wifiMode = 1; // mock
|
// Mocks
|
||||||
|
int wifiMode = 1;
|
||||||
|
int wifiLongRange = 0;
|
||||||
|
int espnowChannel = 6;
|
||||||
|
const int W_DISABLED = 0, W_AP = 1, W_STA = 2, W_ESPNOW = 3;
|
||||||
|
|
||||||
int udpLocalPort = 14580;
|
int udpLocalPort = 14580;
|
||||||
int udpRemotePort = 14550;
|
int udpRemotePort = 14550;
|
||||||
const char *udpRemoteIP = "255.255.255.255";
|
const char *udpRemoteIP = "255.255.255.255";
|
||||||
|
|||||||
Reference in New Issue
Block a user