• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テスト用のあれこれ共用フォルダ


Commit MetaInfo

Revisionba13cd3f0c338052772fdc6fd505eabcd5d764f5 (tree)
Time2018-03-03 15:05:48
Authortakemasa <suikan@user...>
Commitertakemasa

Log Message

Auto History is refactored.

Change Summary

Incremental Difference

--- a/stm32_development/murasaki/Src/my_test.cpp
+++ b/stm32_development/murasaki/Src/my_test.cpp
@@ -65,7 +65,7 @@ void InitTestUart(UART_HandleTypeDef * uart_handle, SPI_HandleTypeDef * spi_hand
6565
6666 // Setting debugger
6767 murasaki::debugger = new murasaki::Debugger(murasaki::platform.logger);
68-// murasaki::debugger->AutoHistory(); // type any key to show history.
68+ murasaki::debugger->AutoHistory(); // type any key to show history.
6969 #if 0
7070 test_fifo = new murasaki::DebuggerFifo(32);
7171 MURASAKI_ASSERT(test_fifo != nullptr);
--- a/stm32_development/murasaki/murasaki/debugger.cpp
+++ b/stm32_development/murasaki/murasaki/debugger.cpp
@@ -55,6 +55,8 @@ Debugger::Debugger(AbstractLogger * logger)
5555 PLATFORM_CONFIG_DEBUG_TASK_PRIORITY, // execusion priority of task
5656 &helpers_ // parameter to task
5757 );
58+ MURASAKI_ASSERT(tx_task_ != nullptr);
59+
5860 tx_task_->Start();
5961
6062 #endif
@@ -224,6 +226,8 @@ void Debugger::RePrint()
224226
225227 // tell there is data
226228 ::xSemaphoreGive(sem_notify_new_data_);
229+#else
230+ helpers_.fifo->ReWind();
227231 #endif
228232 }
229233
@@ -233,6 +237,7 @@ void Debugger::AutoHistory()
233237 // protecting from double task creation
234238 if (auto_history_enabled)
235239 return;
240+#ifdef OLDIMPLEMENTATION
236241
237242 // start the debug task
238243 BaseType_t task_result = ::xTaskCreate(Debugger::LaunchAutoHistoryTask, // task entity;
@@ -244,6 +249,17 @@ void Debugger::AutoHistory()
244249 );
245250 MURASAKI_ASSERT(task_result != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY);
246251
252+#else
253+ auto_reprint_task = new murasaki::DebuggerAutoRePrintTask("DebugTask", // name of task
254+ PLATFORM_CONFIG_DEBUG_TASK_STACK_SIZE, // stack depth
255+ PLATFORM_CONFIG_DEBUG_TASK_PRIORITY, // execusion priority of task
256+ &helpers_ // parameter to task
257+ );
258+ MURASAKI_ASSERT(auto_reprint_task != nullptr);
259+
260+ auto_reprint_task->Start();
261+
262+#endif
247263 auto_history_enabled = true;
248264 }
249265
--- a/stm32_development/murasaki/murasaki/debugger.hpp
+++ b/stm32_development/murasaki/murasaki/debugger.hpp
@@ -24,6 +24,7 @@
2424 #else
2525 #include "debuggerfifo.hpp"
2626 #include "debuggertxtask.hpp"
27+#include "debuggerautoreprinttask.hpp"
2728 #endif
2829
2930 namespace murasaki {
@@ -147,6 +148,8 @@ class Debugger
147148 * \brief Handle to the transmission control task.
148149 */
149150 murasaki::DebuggerTxTask * tx_task_;
151+
152+ murasaki::DebuggerAutoRePrintTask * auto_reprint_task;
150153 #endif
151154 bool auto_history_enabled;
152155 /**