#ifndef __SDL_FLY_HUNTER_WIDGET_HEADER__ #define __SDL_FLY_HUNTER_WIDGET_HEADER__ #include "../core/coreWidget.h" #include "../core/coreLabel.h" #include "buttonWidget.h" #include "simpleButtonWidget.h" #include "simplePanelWidget.h" #include "scrollListWidget.h" //typedef enum E_FH_MODE_FLAGS { // MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1, /* 0b00000001 Reserved for future use. | */ // MAV_MODE_FLAG_TEST_ENABLED = 2, /* 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations. | */ // MAV_MODE_FLAG_AUTO_ENABLED = 4, /* 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation. | */ // MAV_MODE_FLAG_GUIDED_ENABLED = 8, /* 0b00001000 guided mode enabled, system flies waypoints / mission items. | */ // MAV_MODE_FLAG_STABILIZE_ENABLED = 16, /* 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around. | */ // MAV_MODE_FLAG_HIL_ENABLED = 32, /* 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational. | */ // MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64, /* 0b01000000 remote control input is enabled. | */ // MAV_MODE_FLAG_SAFETY_ARMED = 128 //}FH_MODE_FLAGS; class objectFlyHunter; class sdlOsdVideoWidget; extern objectFlyHunter* mHNT; class sdlFlyHunterWidget: public sdlCoreWidget{ private: sdlLabel * m_pNameLabel; sdlLabel * m_pTypeLabel; sdlLabel * m_pModeLabel; sdlLabel * m_pCustomModeLabel; sdlScrollListWidget * m_pComPorts; sdlButtonWidget * m_pArmMode; sdlButtonWidget * m_pLandNow; sdlButtonWidget * m_pTakeOff; sdlButtonWidget * m_pFlyHome; sdlButtonWidget * m_pSetHome; sdlButtonWidget * m_pHoldPosition; sdlButtonWidget * m_pLockXY; sdlButtonWidget * m_pLockYZ; sdlSimpleButtonWidget * m_pReconnect; sdlSimplePanel * m_pFHNfoPanel; sdlSimplePanel * m_pFHBasicModePanel; sdlSimpleButtonWidget * m_pActualModeFlag[8]; sdlSimpleButtonWidget * m_pNewModeFlag[8]; sdlSimpleButtonWidget * m_pSetModeButton; sdlSimplePanel * m_pFHSetModePanel; uint8_t m_bStatusCheckerCnt; uint8_t m_bStatusFH; uint8_t m_bStatusRadio; uint8_t m_bStatusDrone; uint8_t m_bStatusGPS; uint64_t m_bBlinkingTO; bool m_bBlinkingLVL; objectFlyHunter * m_pFH; sdlOsdVideoWidget * m_pOSD; CSTR m_pName; CSTR m_pType; CSTR m_pMode; CSTR m_pCustomMode; TEXTURE_HEAP_ITEM * m_pCtrlTex; bool m_bBasicModeActual; bool m_bCustomModeActual; virtual void drawBefore(SDL_Renderer* pRenderer); virtual void drawAfter(SDL_Renderer* pRenderer); virtual bool create(void); public: explicit sdlFlyHunterWidget(int x, int y, int width, int height, sdlCoreWidget* pParent = NULL); ~sdlFlyHunterWidget(); void attachFlyHunter(objectFlyHunter* ptr); void attachOSD(sdlOsdVideoWidget* ptr); }; #endif