mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Blackbox header and function name tidy
This commit is contained in:
parent
bacc6e6fb1
commit
0118af7eb3
6 changed files with 6 additions and 6 deletions
|
@ -1143,7 +1143,7 @@ static bool sendFieldDefinition(char mainFrameChar, char deltaFrameChar, const v
|
|||
|
||||
// The first header is a field name
|
||||
if (xmitState.headerIndex == 0) {
|
||||
blackboxPrint(def->name);
|
||||
blackboxWriteString(def->name);
|
||||
|
||||
// Do we need to print an index in brackets after the name?
|
||||
if (def->fieldNameIndex != -1) {
|
||||
|
@ -1359,7 +1359,7 @@ void blackboxLogEvent(FlightLogEvent event, flightLogEventData_t *data)
|
|||
blackboxWriteUnsignedVB(data->loggingResume.currentTime);
|
||||
break;
|
||||
case FLIGHT_LOG_EVENT_LOG_END:
|
||||
blackboxPrint("End of log");
|
||||
blackboxWriteString("End of log");
|
||||
blackboxWrite(0);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ void blackboxPrintfHeaderLine(const char *name, const char *fmt, ...)
|
|||
|
||||
blackboxWrite('H');
|
||||
blackboxWrite(' ');
|
||||
blackboxPrint(name);
|
||||
blackboxWriteString(name);
|
||||
blackboxWrite(':');
|
||||
|
||||
va_start(va, fmt);
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
int blackboxPrintf(const char *fmt, ...);
|
||||
void blackboxPrintfHeaderLine(const char *name, const char *fmt, ...);
|
||||
int blackboxPrint(const char *s);
|
||||
|
||||
void blackboxWriteUnsignedVB(uint32_t value);
|
||||
void blackboxWriteSignedVB(int32_t value);
|
||||
|
|
|
@ -84,7 +84,7 @@ void blackboxWrite(uint8_t value)
|
|||
}
|
||||
|
||||
// Print the null-terminated string 's' to the blackbox device and return the number of bytes written
|
||||
int blackboxPrint(const char *s)
|
||||
int blackboxWriteString(const char *s)
|
||||
{
|
||||
int length;
|
||||
const uint8_t *pos;
|
||||
|
|
|
@ -39,6 +39,7 @@ extern int32_t blackboxHeaderBudget;
|
|||
|
||||
void blackboxOpen(void);
|
||||
void blackboxWrite(uint8_t value);
|
||||
int blackboxWriteString(const char *s);
|
||||
|
||||
void blackboxDeviceFlush(void);
|
||||
bool blackboxDeviceFlushForce(void);
|
||||
|
|
|
@ -246,7 +246,7 @@ PG_REGISTER(blackboxConfig_t, blackboxConfig, PG_BLACKBOX_CONFIG, 0);
|
|||
int32_t blackboxHeaderBudget;
|
||||
void mspSerialAllocatePorts(void) {}
|
||||
void blackboxWrite(uint8_t value) {serialWrite(blackboxPort, value);}
|
||||
int blackboxPrint(const char *s)
|
||||
int blackboxWriteString(const char *s)
|
||||
{
|
||||
const uint8_t *pos = (uint8_t*)s;
|
||||
while (*pos) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue