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
Diff: main.cpp
- Revision:
- 2:43801dc371d0
- Parent:
- 1:fec69401b978
--- a/main.cpp Fri Dec 11 08:56:41 2020 +0000
+++ b/main.cpp Wed Dec 16 05:39:37 2020 +0000
@@ -1,14 +1,14 @@
#include "mbed.h"
-
+/*ドップラーシフト対策 calsatが計算した周波数のデータを受け取る*/
Serial pc(SERIAL_TX, SERIAL_RX);
Serial device(PA_9,PA_10);
-void doppler(){
+void doppler(){ //データを取得し、出力する関数
while(1){
char c = device.getc();
- if(c == 0x00)
+ if(c == 0x00)
;
- if(c == 0xfd){
+ if(c == 0xfd){ //FD(終了コマンドがきたら終了
break;
}
else{
@@ -24,13 +24,13 @@
while(1) {
char c = device.getc();
- if(c == 0xfe) {
+ if(c == 0xfe) { //FEコマンドがきたらdataが始まる
while(1) {
c = device.getc();
- if(c == 0x00){
+ if(c == 0x00){ //サブコマンドがきたらデータ部分を読み取り始める
- doppler();
+ doppler();
printf("\r\n");
break;
}