1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

Blackbox header and function name tidy

This commit is contained in:
Martin Budden 2017-07-29 11:48:18 +01:00
parent bacc6e6fb1
commit 0118af7eb3
6 changed files with 6 additions and 6 deletions

View file

@ -1143,7 +1143,7 @@ static bool sendFieldDefinition(char mainFrameChar, char deltaFrameChar, const v
// The first header is a field name // The first header is a field name
if (xmitState.headerIndex == 0) { if (xmitState.headerIndex == 0) {
blackboxPrint(def->name); blackboxWriteString(def->name);
// Do we need to print an index in brackets after the name? // Do we need to print an index in brackets after the name?
if (def->fieldNameIndex != -1) { if (def->fieldNameIndex != -1) {
@ -1359,7 +1359,7 @@ void blackboxLogEvent(FlightLogEvent event, flightLogEventData_t *data)
blackboxWriteUnsignedVB(data->loggingResume.currentTime); blackboxWriteUnsignedVB(data->loggingResume.currentTime);
break; break;
case FLIGHT_LOG_EVENT_LOG_END: case FLIGHT_LOG_EVENT_LOG_END:
blackboxPrint("End of log"); blackboxWriteString("End of log");
blackboxWrite(0); blackboxWrite(0);
break; break;
} }

View file

@ -51,7 +51,7 @@ void blackboxPrintfHeaderLine(const char *name, const char *fmt, ...)
blackboxWrite('H'); blackboxWrite('H');
blackboxWrite(' '); blackboxWrite(' ');
blackboxPrint(name); blackboxWriteString(name);
blackboxWrite(':'); blackboxWrite(':');
va_start(va, fmt); va_start(va, fmt);

View file

@ -19,7 +19,6 @@
int blackboxPrintf(const char *fmt, ...); int blackboxPrintf(const char *fmt, ...);
void blackboxPrintfHeaderLine(const char *name, const char *fmt, ...); void blackboxPrintfHeaderLine(const char *name, const char *fmt, ...);
int blackboxPrint(const char *s);
void blackboxWriteUnsignedVB(uint32_t value); void blackboxWriteUnsignedVB(uint32_t value);
void blackboxWriteSignedVB(int32_t value); void blackboxWriteSignedVB(int32_t value);

View file

@ -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 // 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; int length;
const uint8_t *pos; const uint8_t *pos;

View file

@ -39,6 +39,7 @@ extern int32_t blackboxHeaderBudget;
void blackboxOpen(void); void blackboxOpen(void);
void blackboxWrite(uint8_t value); void blackboxWrite(uint8_t value);
int blackboxWriteString(const char *s);
void blackboxDeviceFlush(void); void blackboxDeviceFlush(void);
bool blackboxDeviceFlushForce(void); bool blackboxDeviceFlushForce(void);

View file

@ -246,7 +246,7 @@ PG_REGISTER(blackboxConfig_t, blackboxConfig, PG_BLACKBOX_CONFIG, 0);
int32_t blackboxHeaderBudget; int32_t blackboxHeaderBudget;
void mspSerialAllocatePorts(void) {} void mspSerialAllocatePorts(void) {}
void blackboxWrite(uint8_t value) {serialWrite(blackboxPort, value);} 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; const uint8_t *pos = (uint8_t*)s;
while (*pos) { while (*pos) {