firmware/src/graphics/draw/CompassRenderer.h
Ben Meadors 77e7235ce5
Screen refactor / move to renderers (#6932)
* WIP Screen.cpp refactoring

* WIP

* Notification and time

* Draw nodes and device focused

* Namespacing and more moved methods

* Move EInk ones

* Eink fixes

* Remove useless wrapper functions

* Update alignments and spacing

* Update src/graphics/draw/NotificationRenderer.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fully qualify

* Move drawfunctionoverlay

* Put the imperial back

* CompassRenderer methods

* Moar

* Another

* Fixed compassarrow renderer

* Draw columns

* Name cleanup

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-31 19:31:45 -05:00

37 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);
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
float estimatedHeading(double lat, double lon);
uint16_t getCompassDiam(uint32_t displayWidth, uint32_t displayHeight);
// Utility functions for bearing calculations
float calculateBearing(double lat1, double lon1, double lat2, double lon2);
} // namespace CompassRenderer
} // namespace graphics