Add Code to caculate the Scanner Performance
diff --git a/code/application/test/pmp_application_test/player/src/bt.cpp b/code/application/test/pmp_application_test/player/src/bt.cpp
index 407ac6f..83911ae 100644
--- a/code/application/test/pmp_application_test/player/src/bt.cpp
+++ b/code/application/test/pmp_application_test/player/src/bt.cpp
@@ -787,6 +787,10 @@ bool CBt::RxDefault()
{
if (CfgIni.SoftwareHandshake == ENABLE_SOFTWARE_HANDSHAKE)
{
+ // SSI profile will go through here
+ ULONG latency = tx_time_get() - Flags.Test_Start;
+ Sys.Logf("Latency is %d ms", latency*OS_MSEC_PER_TICK);
+
Uart.SwitchTo(UART_SW_DEC);
tx_thread_sleep(OS_MSECS_TO_TICKS(10)); // wait for uart stable
Dec.SendHostResult(true);
diff --git a/code/application/test/pmp_application_test/player/src/evt.cpp b/code/application/test/pmp_application_test/player/src/evt.cpp
index 0e269b5..201bfec 100644
--- a/code/application/test/pmp_application_test/player/src/evt.cpp
+++ b/code/application/test/pmp_application_test/player/src/evt.cpp
@@ -1949,6 +1949,9 @@ extern "C" void EvtUartRxDec(void)
if (opCode==SSI_DECODE_DATA)
{
+ ULONG TimeToDecode = tx_time_get() - Flags.Test_Start;
+ Sys.Logf("Time to decode is %d ms", TimeToDecode*OS_MSEC_PER_TICK);
+
/*for (int i = 0; i < len + 5; i++)
Sys.Logf("m_bcodeBuf[%d] = 0x%X/%c",i,BCode.m_bcodeBuf[i],BCode.m_bcodeBuf[i]);*/
@@ -1975,6 +1978,9 @@ extern "C" void EvtUartRxDec(void)
Dec.SendHostResult(true);
}
}
+ // Batch/HID/SSP will go through here, we record the fininsh time here
+ ULONG latency = tx_time_get() - Flags.Test_Start;
+ Sys.Logf("Latency is %d ms", latency*OS_MSEC_PER_TICK);
}
#if 0
else if (opCode==SSI_EVENT)
@@ -4817,6 +4823,7 @@ void CDo::PlusBtnDown()
}
else
{
+ Flags.Test_Start=tx_time_get();
// If the Host_Trigger still assert, then it needs to de-assert first.
if (Dec.IsTriggered())
{
diff --git a/code/application/test/pmp_application_test/player/src/flags.hpp b/code/application/test/pmp_application_test/player/src/flags.hpp
index 6b8bd64..073f972 100644
--- a/code/application/test/pmp_application_test/player/src/flags.hpp
+++ b/code/application/test/pmp_application_test/player/src/flags.hpp
@@ -71,6 +71,8 @@ public:
uint32 SsiOption1PacketLen;
uint32 SsiOption1PacketTotalCounts;
uint32 SsiOption1PacketCurrentCount;
+
+ ULONG Test_Start;
uint32 IsSsiLedTimerEnabled :1;