mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-15 07:51:19 +10:00
* Infinite calibration loop fix * Save calibration * Screen refresh * reduce repeated code * reduce repeated code to reduce flash * fix Waypoint compass size and no fix no heading labels * Don't show compass unless we have a heading and location * If no calculated heading from moving, we should have no heading * Slow walking calculated heading and auto stale heading when not moving * Triming flash space * cleanup * show "?" when no location or heading for distance and heading screen * cleanup * Stale heading logic * final trim * Compass Calibration screen redesign * Trunk Fix * Compile fix * patch * Update src/motion/MotionSensor.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update WaypointModule.cpp --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "graphics/Screen.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
|