HamBook – Diff between revs 46 and 54

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 46 Rev 54
Line 1... Line -...
1 using System; -  
2 using System.Collections.Generic; -  
3 using System.ComponentModel; -  
4 using System.IO.Ports; -  
5 using System.Linq; 1 using System.Threading;
6 using System.Text; -  
7 using System.Threading.Tasks; 2 using System.Threading.Tasks;
8 using HamBook.Radios.Generic; -  
9 using static HamBook.Radios.Yaesu.FT_891.Constants; -  
10 using RJCP.IO.Ports; 3 using RJCP.IO.Ports;
11 using System.Threading; 4 using static HamBook.Radios.Yaesu.FT_891.Constants;
Line 12... Line 5...
12   5  
13 namespace HamBook.Radios.Yaesu.FT_891.CAT 6 namespace HamBook.Radios.Yaesu.FT_891.CAT
14 { 7 {
15 [Radio("Yaesu FT-891")] 8 [Radio("Yaesu FT-891")]
16 public class SV : Generic.CAT.SV 9 public class Sv : Generic.CAT.Sv
17 { -  
18 public override CatLength CatLength => new CatLength { Set = 3 }; -  
19   10 {
20 public SV(SerialPortStream serialPort) : base(serialPort) 11 public Sv(SerialPortStream serialPort) : base(serialPort)
21 { 12 {
Line -... Line 13...
-   13 }
-   14  
22 } 15 public override CatLength CatLength => new CatLength { Set = 3 };
23   16  
24 public override void Set() 17 public override void Set()
25 { 18 {
Line 26... Line 19...
26 SerialPort.Write($"{Name}{Constants.EOT}"); 19 SerialPort.Write($"{Name}{Eot}");
27 } 20 }
28   21  
Line 29... Line 22...
29 public override async Task WriteAsync(CancellationToken cancellationToken) 22 public override async Task WriteAsync(CancellationToken cancellationToken)
30 { 23 {
31 var payload = Constants.Encoding.GetBytes($"{Name}{Constants.EOT}"); 24 var payload = Encoding.GetBytes($"{Name}{Eot}");
32   25  
33 await SerialPort.WriteAsync(payload, 0, payload.Length, cancellationToken); 26 await SerialPort.WriteAsync(payload, 0, payload.Length, cancellationToken);