Loading...
Searching...
No Matches
BindMapMarker.hpp
1#ifndef __BINDMAPMARKER_HPP
2#define __BINDMAPMARKER_HPP
3#include "BindView.hpp"
4#include "BindUtils.hpp"
15 class BindMapMarker : public BindView
16{
17 public:
18 BindMapMarker();
19 float lat = 0.0f;
20 float lon = 0.0f;
21 float rotation = 0.0f;
22 uint8_t scale = 100;
23 uint8_t iconId = MARKER_PIN_RED;
24 uint8_t cmdId = 0;
25
35 uint16_t getBytes(uint8_t *out) override
36 {
37 offset = 0;
38 copyAndOffset(out, &offset, &objID, sizeof(objID));
39 copyAndOffset(out, &offset, &tag, sizeof(tag));
40 copyAndOffset(out, &offset, &lat, sizeof(lat));
41 copyAndOffset(out, &offset, &lon, sizeof(lon));
42 copyAndOffset(out, &offset, &rotation, sizeof(rotation));
43 copyAndOffset(out, &offset, &iconId, sizeof(iconId));
44 copyAndOffset(out, &offset, &scale, sizeof(scale));
45 copyAndOffset(out, &offset, &cmdId, sizeof(cmdId));
46 return offset;
47 }
48
49 private:
50 uint8_t objID = BIND_ID_MAP_MARKER;
51 uint16_t offset = 0;
52 static int16_t tagIndex;
53};
54
55#endif /* __BINDMAPMARKER_HPP */
BindMapMarker
Represents a marker to be used in BindMap (street map) within BindCanvas.
Definition BindMapMarker.hpp:16
BindMapMarker::rotation
float rotation
Rotation angle of the marker (in degrees).
Definition BindMapMarker.hpp:21
BindMapMarker::getBytes
uint16_t getBytes(uint8_t *out) override
Serializes the marker data into a byte array.
Definition BindMapMarker.hpp:35
BindMapMarker::scale
uint8_t scale
Scale factor for the marker's size.
Definition BindMapMarker.hpp:22
BindMapMarker::lon
float lon
Longitude coordinate of the marker's position.
Definition BindMapMarker.hpp:20
BindMapMarker::iconId
uint8_t iconId
Identifier for the marker's icon. Visit Markers enum in BindView.h.
Definition BindMapMarker.hpp:23
BindMapMarker::cmdId
uint8_t cmdId
Command identifier.
Definition BindMapMarker.hpp:24
BindMapMarker::lat
float lat
Latitude coordinate of the marker's position.
Definition BindMapMarker.hpp:19
BindView
Definition BindView.hpp:26