auto-sync
This commit is contained in:
parent
e73720d804
commit
f79965c725
|
@ -104,17 +104,12 @@ static int ts_serial_ready(void) {
|
||||||
// this thread wants a bit extra stack
|
// this thread wants a bit extra stack
|
||||||
static THD_WORKING_AREA(tsThreadStack, UTILITY_THREAD_STACK_SIZE + 200);
|
static THD_WORKING_AREA(tsThreadStack, UTILITY_THREAD_STACK_SIZE + 200);
|
||||||
|
|
||||||
static int tsCounter = 0;
|
|
||||||
|
|
||||||
//static TunerStudioWriteValueRequest writeValueRequest;
|
|
||||||
//static TunerStudioWriteChunkRequest writeChunkRequest;
|
|
||||||
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
extern TunerStudioOutputChannels tsOutputChannels;
|
||||||
|
|
||||||
extern tunerstudio_counters_s tsState;
|
extern tunerstudio_counters_s tsState;
|
||||||
|
|
||||||
static void resetTs(void) {
|
static void resetTs(void) {
|
||||||
|
memset(&tsState, sizeof(tsState), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -133,7 +128,7 @@ void printTsStats(void) {
|
||||||
}
|
}
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
scheduleMsg(tsLogger, "TunerStudio size=%d / total=%d / errors=%d / H=%d / O=%d / P=%d / B=%d",
|
scheduleMsg(tsLogger, "TunerStudio size=%d / total=%d / errors=%d / H=%d / O=%d / P=%d / B=%d",
|
||||||
sizeof(tsOutputChannels), tsCounter, tsState.errorCounter, tsState.queryCommandCounter,
|
sizeof(tsOutputChannels), tsState.tsCounter, tsState.errorCounter, tsState.queryCommandCounter,
|
||||||
tsState.outputChannelsCommandCounter, tsState.readPageCommandsCounter, tsState.burnCommandCounter);
|
tsState.outputChannelsCommandCounter, tsState.readPageCommandsCounter, tsState.burnCommandCounter);
|
||||||
scheduleMsg(tsLogger, "TunerStudio W=%d / C=%d / P=%d / page=%d", tsState.writeValueCommandCounter,
|
scheduleMsg(tsLogger, "TunerStudio W=%d / C=%d / P=%d / page=%d", tsState.writeValueCommandCounter,
|
||||||
tsState.writeChunkCommandCounter, tsState.pageCommandCounter, currentPageId);
|
tsState.writeChunkCommandCounter, tsState.pageCommandCounter, currentPageId);
|
||||||
|
@ -464,7 +459,7 @@ static msg_t tsThreadEntryPoint(void *arg) {
|
||||||
// scheduleSimpleMsg(&logger, "ts channel is now ready ", hTimeNow());
|
// scheduleSimpleMsg(&logger, "ts channel is now ready ", hTimeNow());
|
||||||
}
|
}
|
||||||
|
|
||||||
tsCounter++;
|
tsState.tsCounter++;
|
||||||
|
|
||||||
int recieved = chSequentialStreamRead(getTsSerialDevice(), &firstByte, 1);
|
int recieved = chSequentialStreamRead(getTsSerialDevice(), &firstByte, 1);
|
||||||
if (recieved != 1) {
|
if (recieved != 1) {
|
||||||
|
|
|
@ -32,6 +32,7 @@ typedef struct {
|
||||||
int writeValueCommandCounter;
|
int writeValueCommandCounter;
|
||||||
int writeChunkCommandCounter;
|
int writeChunkCommandCounter;
|
||||||
int errorCounter;
|
int errorCounter;
|
||||||
|
int tsCounter;
|
||||||
} tunerstudio_counters_s;
|
} tunerstudio_counters_s;
|
||||||
|
|
||||||
int tunerStudioHandleCrcCommand(uint8_t *data, int incomingPacketSize);
|
int tunerStudioHandleCrcCommand(uint8_t *data, int incomingPacketSize);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* @file error_handling.c
|
* @file error_handling.cpp
|
||||||
*
|
*
|
||||||
* @date Apr 1, 2014
|
* @date Apr 1, 2014
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2015
|
* @author Andrey Belomutskiy, (c) 2012-2015
|
||||||
|
|
Loading…
Reference in New Issue