HamBook – Diff between revs 23 and 39

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 23 Rev 39
Line 8... Line 8...
8 using HamBook.Radios.Generic; 8 using HamBook.Radios.Generic;
9 using static HamBook.Radios.Yaesu.FT_891.Constants; 9 using static HamBook.Radios.Yaesu.FT_891.Constants;
10 using RJCP.IO.Ports; 10 using RJCP.IO.Ports;
11 using System.Threading; 11 using System.Threading;
12 using System.Text.RegularExpressions; 12 using System.Text.RegularExpressions;
-   13 using System.Diagnostics;
Line 13... Line 14...
13   14  
14 namespace HamBook.Radios.Yaesu.FT_891.CAT 15 namespace HamBook.Radios.Yaesu.FT_891.CAT
15 { 16 {
16 [Radio("Yaesu FT-891")] 17 [Radio("Yaesu FT-891")]
Line 76... Line 77...
76 { 77 {
77 var payload = Constants.Encoding.GetBytes($"{Name}00{(int)tunerState}{Generic.Constants.EOT}"); 78 var payload = Constants.Encoding.GetBytes($"{Name}00{(int)tunerState}{Generic.Constants.EOT}");
Line 78... Line 79...
78   79  
Line 79... Line 80...
79 await SerialPort.WriteAsync(payload, 0, payload.Length, cancellationToken); 80 await SerialPort.WriteAsync(payload, 0, payload.Length, cancellationToken);
-   81  
-   82 var read = await ReadAsync(cancellationToken);
80   83  
Line 81... Line 84...
81 return await ReadAsync(cancellationToken) == tunerState; 84 return read == tunerState;
82 } 85 }
83   86