mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-10 23:56:25 -04:00
* True Colors on TFT (Heltec Mesh Node T114, Heltec Vision Master T190, CardPuter Adv, T-Deck, T-Lora Pager) * Theme support - New and some Classic Themes! * Colored Compass --------- Co-authored-by: Jason P <applewiz@mac.com> Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "graphics/Screen.h"
|
|
#include "mesh/generated/meshtastic/mesh.pb.h"
|
|
#include <OLEDDisplay.h>
|
|
#include <OLEDDisplayUi.h>
|
|
|
|
namespace graphics
|
|
{
|
|
|
|
/// Forward declarations
|
|
class Screen;
|
|
|
|
/**
|
|
* @brief Compass and navigation drawing functions
|
|
*
|
|
* Contains all functions related to drawing compass elements, headings,
|
|
* navigation arrows, and location-based UI components.
|
|
*/
|
|
namespace CompassRenderer
|
|
{
|
|
// Compass drawing functions
|
|
void drawCompassNorth(OLEDDisplay *display, int16_t compassX, int16_t compassY, float myHeading, int16_t radius);
|
|
void drawNodeHeading(OLEDDisplay *display, int16_t compassX, int16_t compassY, uint16_t compassDiam, float headingRadian);
|
|
void drawArrowToNode(OLEDDisplay *display, int16_t x, int16_t y, int16_t size, float bearing);
|
|
|
|
// Navigation and location functions
|
|
bool getHeadingRadians(double lat, double lon, float &headingRadian);
|
|
float adjustBearingForCompassMode(float bearingRadian, float headingRadian);
|
|
float radiansToDegrees360(float angleRadian);
|
|
uint16_t getCompassDiam(uint32_t displayWidth, uint32_t displayHeight);
|
|
|
|
} // namespace CompassRenderer
|
|
|
|
} // namespace graphics
|