forked from simplefoc/Arduino-FOC-drivers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeleplotTelemetry.cpp
More file actions
36 lines (25 loc) · 763 Bytes
/
Copy pathTeleplotTelemetry.cpp
File metadata and controls
36 lines (25 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "./TeleplotTelemetry.h"
TeleplotTelemetry::TeleplotTelemetry(){
};
TeleplotTelemetry::~TeleplotTelemetry(){
// nothing to do here
};
void TeleplotTelemetry::init(TextIO& _comms){
this->Telemetry::init(_comms);
};
void TeleplotTelemetry::sendTelemetry(){
if (numRegisters > 0) {
for (uint8_t i = 0; i < numRegisters; i++) {
*comms << '>';
if (registers_motor[i] != 0) {
*comms << registers_motor[i] << '_';
}
*comms << registers[i] << ':';
SimpleFOCRegisters::regs->registerToComms(*comms, registers[i], motors[registers_motor[i]]);
*comms << '\n';
};
}
};
void TeleplotTelemetry::sendHeader(){
// don't do anything
};