File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ pub struct Stat {
529
529
pub long : f64 ,
530
530
/// GPS altitude of the gateway in meter RX (integer).
531
531
#[ serde( default ) ]
532
- pub alti : u32 ,
532
+ pub alti : f64 ,
533
533
/// Number of radio packets received (unsigned integer).
534
534
pub rxnb : u32 ,
535
535
/// Number of radio packets received with a valid PHY CRC.
@@ -552,11 +552,11 @@ impl Stat {
552
552
gateway_id : hex:: encode ( gateway_id) ,
553
553
time : Some ( pbjson_types:: Timestamp :: from ( self . time ) ) ,
554
554
location : {
555
- if self . lati != 0.0 || self . long != 0.0 || self . alti != 0 {
555
+ if self . lati != 0.0 || self . long != 0.0 || self . alti != 0.0 {
556
556
Some ( common:: Location {
557
557
latitude : self . lati ,
558
558
longitude : self . long ,
559
- altitude : self . alti . into ( ) ,
559
+ altitude : self . alti ,
560
560
source : common:: LocationSource :: Gps . into ( ) ,
561
561
..Default :: default ( )
562
562
} )
@@ -970,7 +970,7 @@ mod test {
970
970
time : now,
971
971
lati : 0.0 ,
972
972
long : 0.0 ,
973
- alti : 0 ,
973
+ alti : 0.0 ,
974
974
rxnb : 10 ,
975
975
rxok : 5 ,
976
976
rxfw : 5 ,
@@ -1010,7 +1010,7 @@ mod test {
1010
1010
time : now,
1011
1011
lati : 1.1 ,
1012
1012
long : 2.2 ,
1013
- alti : 3 ,
1013
+ alti : - 3. 3,
1014
1014
rxnb : 10 ,
1015
1015
rxok : 5 ,
1016
1016
rxfw : 5 ,
@@ -1032,7 +1032,7 @@ mod test {
1032
1032
location: Some ( common:: Location {
1033
1033
latitude: 1.1 ,
1034
1034
longitude: 2.2 ,
1035
- altitude: 3.0 ,
1035
+ altitude: - 3.3 ,
1036
1036
source: common:: LocationSource :: Gps . into( ) ,
1037
1037
..Default :: default ( )
1038
1038
} ) ,
@@ -1056,7 +1056,7 @@ mod test {
1056
1056
time : now,
1057
1057
lati : 0.0 ,
1058
1058
long : 0.0 ,
1059
- alti : 0 ,
1059
+ alti : 0.0 ,
1060
1060
rxnb : 10 ,
1061
1061
rxok : 5 ,
1062
1062
rxfw : 5 ,
You can’t perform that action at this time.
0 commit comments