type signature, guards
This commit is contained in:
parent
d1b4e9c4ca
commit
a931928a61
|
@ -650,12 +650,13 @@ static void handleGetVersion(TsChannelBase* tsChannel) {
|
|||
tsChannel->sendResponse(TS_CRC, (const uint8_t *) versionBuffer, strlen(versionBuffer) + 1);
|
||||
}
|
||||
|
||||
#if EFI_TEXT_LOGGING
|
||||
static void handleGetText(TsChannelBase* tsChannel) {
|
||||
tsState.textCommandCounter++;
|
||||
|
||||
printOverallStatus(getTimeNowSeconds());
|
||||
|
||||
int outputSize;
|
||||
size_t outputSize;
|
||||
const char* output = swapOutputBuffers(&outputSize);
|
||||
#if EFI_SIMULATOR
|
||||
logMsg("get test sending [%d]\r\n", outputSize);
|
||||
|
@ -666,6 +667,7 @@ static void handleGetText(TsChannelBase* tsChannel) {
|
|||
logMsg("sent [%d]\r\n", outputSize);
|
||||
#endif
|
||||
}
|
||||
#endif // EFI_TEXT_LOGGING
|
||||
|
||||
static void handleExecuteCommand(TsChannelBase* tsChannel, char *data, int incomingPacketSize) {
|
||||
data[incomingPacketSize] = 0;
|
||||
|
@ -746,9 +748,11 @@ int TunerStudioBase::handleCrcCommand(TsChannelBase* tsChannel, char *data, int
|
|||
handleTsW(tsChannel, data);
|
||||
break;
|
||||
#endif // (EFI_FILE_LOGGING && !HAL_USE_USB_MSD)
|
||||
#if EFI_TEXT_LOGGING
|
||||
case TS_GET_TEXT:
|
||||
handleGetText(tsChannel);
|
||||
break;
|
||||
#endif // EFI_TEXT_LOGGING
|
||||
case TS_EXECUTE:
|
||||
handleExecuteCommand(tsChannel, data, incomingPacketSize - 1);
|
||||
break;
|
||||
|
|
|
@ -99,7 +99,7 @@ void scheduleLogging(Logging* logging) {
|
|||
* this method should always be invoked from the same thread!
|
||||
* @return pointer to the buffer which should be print to console
|
||||
*/
|
||||
const char* swapOutputBuffers(int *actualOutputBufferSize) {
|
||||
const char* swapOutputBuffers(size_t* actualOutputBufferSize) {
|
||||
#if EFI_ENABLE_ASSERTS
|
||||
int expectedOutputSize;
|
||||
#endif /* EFI_ENABLE_ASSERTS */
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
|
||||
class Logging;
|
||||
|
||||
const char* swapOutputBuffers(int *actualOutputBufferSize);
|
||||
const char* swapOutputBuffers(size_t* actualOutputBufferSize);
|
||||
void scheduleMsg(Logging *logging, const char *fmt, ...);
|
||||
|
|
Loading…
Reference in New Issue