Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SerialTxRxIntr F446_AD_DA_Multirate
Diff: main.cpp
- Revision:
- 5:5f98dddab84b
- Parent:
- 4:3087a0841304
- Child:
- 6:52578f592334
diff -r 3087a0841304 -r 5f98dddab84b main.cpp
--- a/main.cpp Sun Oct 07 11:37:07 2018 +0000
+++ b/main.cpp Mon Oct 08 07:44:11 2018 +0000
@@ -8,11 +8,17 @@
// PC からの指令: 0.00 ~ 1.00 倍
// 音量調整あり/なしは PC からの指令により ACTIVE/THROUGH の切り替えが可能
//
+// PC 側にデータを送る際のフォーマット
+// 先頭の1文字で送る内容を区別する
+// L: ラベルに表示する文字列
+// S: スライダ(TrackBar)のツマミの位置
+// M: ステータス・バーに表示する文字列
+//
// PC 側のプログラム
// F446_AD_DA_Ctrl
// 端末エミュレータでも使用可能
//
-// 2018/10/07, Copyright (c) 2018 MIKAMI, Naoki
+// 2018/10/08, Copyright (c) 2018 MIKAMI, Naoki
//----------------------------------------------------------------------
#include "F446_Multirate.hpp"
@@ -30,7 +36,7 @@
void SendParm(float parm)
{
char buf[32];
- sprintf(buf, "L音量: %3d %%\r\n", (int)(parm*100));
+ sprintf(buf, "L音量: %3d %%\n", (int)(parm*100));
rxTx_.Tx(buf); // label1 に表示する文字列を送信
}
@@ -71,6 +77,8 @@
char buf[16];
sprintf(buf, "S%5d\n", (uint32_t)(65535*volume));
rxTx_.Tx(buf); // スライダ(TrackBar)の位置を送信
+
+ rxTx_.Tx("M入力信号をそのまま出力\n");
}
else // "ENQ" 以外の処理
{
@@ -99,3 +107,4 @@
}
}
+