HamBook – Diff between revs 3 and 9

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 3 Rev 9
Line 6... Line 6...
6 using System.Linq; 6 using System.Linq;
7 using System.Text; 7 using System.Text;
8 using System.Text.RegularExpressions; 8 using System.Text.RegularExpressions;
9 using System.Threading.Tasks; 9 using System.Threading.Tasks;
10 using static HamBook.Radios.Yaesu.FT_891.Constants; 10 using static HamBook.Radios.Yaesu.FT_891.Constants;
-   11 using RJCP.IO.Ports;
Line 11... Line 12...
11   12  
12 namespace HamBook.Radios.Yaesu.FT_891.CAT 13 namespace HamBook.Radios.Yaesu.FT_891.CAT
13 { 14 {
14 [Radio("Yaesu FT-891")] 15 [Radio("Yaesu FT-891")]
15 public class IF : Generic.CAT.IF 16 public class IF : Generic.CAT.IF
-   17 {
16 { 18 public override CatLength CatLength => new CatLength { Answer = 28, Read = 3 };
17 public IF(SerialPort serialPort) : base(serialPort) 19 public IF(SerialPortStream serialPort) : base(serialPort)
18 { 20 {
Line 19... Line 21...
19 } 21 }
20   22  
21 public override Information Read() 23 public override Information Read()
22 { 24 {
23 SerialPort.Write($"{Name}{Generic.Constants.EOT}"); 25 SerialPort.Write($"{Name}{Generic.Constants.EOT}");
Line 24... Line 26...
24 var result = SerialPort.ReadTo(Generic.Constants.EOT); 26 var result = SerialPort.ReadTo($"{Generic.Constants.EOT}");
25 var match = InformationRegex.Match(result); 27 var match = InformationRegex.Match(result);
26   28