FT857D-ESP32/FT857D-ESP32.cpp
// get the S Meter value from the radio F6CZV
// 
get the S Meter value from the radio F6CZV
get the S Meter value from the radio F6CZV
String FT857D::getSMeter() {   
	byte rigTXState[5] = {0x00,0x00,0x00,0x00,0x00};
	rigTXState[4] = CAT_RX_DATA_CMD;
	String SMeterl;
	byte reply;
	sendCmd(rigTXState, 5);	
	reply = getByte();
	reply = reply & 0x0f;
	if (reply < 10) {SMeterl = "S" + String(reply);
	}
	else {
	 switch (reply)
       {
        case 10:
           SMeterl = "S9+10";
           break;
	case 11:
           SMeterl = "S9+20";
           break;
	case 12:
           SMeterl = "S9+30";
            break;
	case 13:
            SMeterl = "S9+40";
            break;
	case 14:
            SMeterl = "S9+50";
           break;
	case 15:
            SMeterl = "S9+60";
           break;
	default:
            SMeterl = "UNK  ";
            break;
          }
	}
	return SMeterl;
}
String FT857D :: getSMeter ( ) { byte rigTXState [ 5 ] = { 0x00 , 0x00 , 0x00 , 0x00 , 0x00 } ; rigTXState [ 4 ] = CAT_RX_DATA_CMD ; String SMeterl ; byte reply ; sendCmd ( rigTXState , 5 ) ; reply = getByte ( ) ; reply = reply & 0x0f ; if ( reply < 10 ) { SMeterl = " " + String ( reply ) ; } else { switch ( reply ) { case 10 : SMeterl = " " ; break ; case 11 : SMeterl = " " ; break ; case 12 : SMeterl = " " ; break ; case 13 : SMeterl = " " ; break ; case 14 : SMeterl = " " ; break ; case 15 : SMeterl = " " ; break ; default : SMeterl = " " ; break ; } } return SMeterl ; }
get the S Meter value from the radio F6CZV
get the S Meter value from the radio F6CZV