Bind
C++ UI toolkit for Arduino
 
Loading...
Searching...
No Matches
BindAttitudeIndicator Class Reference

Represents an attitude indicator UI element in the Bind framework. More...

#include <BindAttitudeIndicator.hpp>

Inheritance diagram for BindAttitudeIndicator:
BindView

Public Member Functions

uint16_t getBytes (uint8_t *out) override
 Generates and returns the byte data representing the attitude indicator configuration.
 

Public Attributes

int16_t x = 0
 X-coordinate position of the attitude indicator.
 
int16_t y = 0
 Y-coordinate position of the attitude indicator.
 
uint8_t cmdId = 0
 
int16_t dimSize = 200
 Dimension size of the attitude indicator.
 
float roll = 0.0f
 Roll angle value for orientation.
 
float pitch = 0.0f
 Pitch angle value for orientation.
 
- Public Attributes inherited from BindView
int16_t tag
 

Detailed Description

Represents an attitude indicator UI element in the Bind framework.

BindAttitudeIndicator

The BindAttitudeIndicator class enables the creation of an attitude indicator within your Arduino projects. This UI element visually displays the roll and pitch of a vehicle or object, providing valuable information about its orientation. You can customize the appearance and behavior of the attitude indicator, such as its position, size, and orientation values.

Note
Possible cmdId values for a BindView and corresponding effects:
  • BIND_ADD_OR_REFRESH_CMD: Adds the object to the canvas (screen) or refreshes the existing one.
  • BIND_DATA_ONLY_CMD: Refreshes the existing object without moving or resizing; updates data, such as text.
  • BIND_REMOVE_CMD: Removes the object from the canvas (screen).
  • BIND_DISABLE_CMD: Disables the object.
  • BIND_ENABLE_CMD: Enables the object.
  • BIND_HIDE_CMD: Hides the object.
  • BIND_VISIBLE_CMD: Restores the object's visibility.

Example usage:

  • Create an attitude indicator with specific settings.
  • Set its position and dimensions on the screen.
  • Configure the roll and pitch values to visualize the object's orientation.
  • Synchronize the attitude indicator with the Bind framework using bind.sync(myIndicator) when you need to refresh the values.

Member Function Documentation

◆ getBytes()

uint16_t BindAttitudeIndicator::getBytes ( uint8_t *  out)
inlineoverridevirtual

Generates and returns the byte data representing the attitude indicator configuration.

This function is meant for internal use by the Bind framework and should not be called directly by users. It serializes the attitude indicator's properties into a byte array for communication with the Bind framework.

Parameters
outPointer to the output byte array.
Returns
The number of bytes written to the output array.

Reimplemented from BindView.


The documentation for this class was generated from the following files: