mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-16 21:03:23 +00:00
gps: improve error handling
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -38,6 +38,10 @@ func (ge GPSError) Error() string {
|
|||||||
return ge.Err.Error() + " " + ge.Info + " " + ge.Sentence
|
return ge.Err.Error() + " " + ge.Info + " " + ge.Sentence
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ge GPSError) Unwrap() error {
|
||||||
|
return ge.Err
|
||||||
|
}
|
||||||
|
|
||||||
// Device wraps a connection to a GPS device.
|
// Device wraps a connection to a GPS device.
|
||||||
type Device struct {
|
type Device struct {
|
||||||
buffer []byte
|
buffer []byte
|
||||||
|
|||||||
Reference in New Issue
Block a user