Tidied blackbox function names to have blackbox prefix

This commit is contained in:
Martin Budden 2017-04-28 09:46:44 +01:00
parent 280fc1dca1
commit d1302712f2
5 changed files with 17 additions and 18 deletions

View File

@ -787,7 +787,7 @@ static int gcd(int num, int denom)
return gcd(denom, num % denom);
}
void validateBlackboxConfig()
void blackboxValidateConfig()
{
int div;
@ -825,9 +825,9 @@ void validateBlackboxConfig()
/**
* Start Blackbox logging if it is not already running. Intended to be called upon arming.
*/
void startBlackbox(void)
static void blackboxStart(void)
{
validateBlackboxConfig();
blackboxValidateConfig();
if (!blackboxDeviceOpen()) {
blackboxSetState(BLACKBOX_STATE_DISABLED);
@ -870,7 +870,7 @@ void startBlackbox(void)
/**
* Begin Blackbox shutdown.
*/
void finishBlackbox(void)
void blackboxFinish(void)
{
switch (blackboxState) {
case BLACKBOX_STATE_DISABLED:
@ -903,14 +903,14 @@ void startInTestMode(void)
return; // When in test mode, we cannot share the MSP and serial logger port!
}
}
startBlackbox();
blackboxStart();
startedLoggingInTestMode = true;
}
}
void stopInTestMode(void)
{
if(startedLoggingInTestMode) {
finishBlackbox();
blackboxFinish();
startedLoggingInTestMode = false;
}
}
@ -1484,7 +1484,7 @@ static void blackboxLogIteration(timeUs_t currentTimeUs)
/**
* Call each flight loop iteration to perform blackbox logging.
*/
void handleBlackbox(timeUs_t currentTimeUs)
void blackboxUpdate(timeUs_t currentTimeUs)
{
int i;
@ -1492,7 +1492,7 @@ void handleBlackbox(timeUs_t currentTimeUs)
case BLACKBOX_STATE_STOPPED:
if (ARMING_FLAG(ARMED)) {
blackboxOpen();
startBlackbox();
blackboxStart();
}
#ifdef USE_FLASHFS
if (IS_RC_MODE_ACTIVE(BOXBLACKBOXERASE)) {
@ -1676,7 +1676,7 @@ void handleBlackbox(timeUs_t currentTimeUs)
/**
* Call during system startup to initialize the blackbox.
*/
void initBlackbox(void)
void blackboxInit(void)
{
if (blackboxConfig()->device) {
blackboxSetState(BLACKBOX_STATE_STOPPED);

View File

@ -45,10 +45,9 @@ PG_DECLARE(blackboxConfig_t, blackboxConfig);
void blackboxLogEvent(FlightLogEvent event, flightLogEventData_t *data);
void initBlackbox(void);
void handleBlackbox(timeUs_t currentTimeUs);
void validateBlackboxConfig();
void startBlackbox(void);
void finishBlackbox(void);
void blackboxInit(void);
void blackboxUpdate(timeUs_t currentTimeUs);
void blackboxValidateConfig();
void blackboxFinish(void);
bool blackboxMayEditConfig(void);

View File

@ -178,7 +178,7 @@ static long cmsx_Blackbox_onExit(const OSD_Entry *self)
if (blackboxMayEditConfig()) {
blackboxConfigMutable()->device = cmsx_BlackboxDevice;
validateBlackboxConfig();
blackboxValidateConfig();
}
blackboxConfigMutable()->rate_denom = blackboxConfig_rate_denom;
return 0;

View File

@ -177,7 +177,7 @@ void mwDisarm(void)
#ifdef BLACKBOX
if (blackboxConfig()->device) {
finishBlackbox();
blackboxFinish();
}
#endif
BEEP_OFF;
@ -555,7 +555,7 @@ static void subTaskMainSubprocesses(timeUs_t currentTimeUs)
#ifdef BLACKBOX
if (!cliMode && blackboxConfig()->device) {
handleBlackbox(currentTimeUs);
blackboxUpdate(currentTimeUs);
}
#else
UNUSED(currentTimeUs);

View File

@ -550,7 +550,7 @@ void init(void)
#endif
#ifdef BLACKBOX
initBlackbox();
blackboxInit();
#endif
if (mixerConfig()->mixerMode == MIXER_GIMBAL) {