doppler shift / Mbed 2 deprecated calsat32_5

Dependencies:   mbed

Revision:
2:43801dc371d0
Parent:
1:fec69401b978
Child:
3:61e7dda0c14d
--- 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;
                     }