rivian-python-client 2.4.0__py3-none-any.whl → 2.4.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rivian/__version__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '2.4.0'
4
+ __version__ = VERSION = '2.4.1'
@@ -93,16 +93,20 @@ def decode_gear(m: dynamics_pb2.Gear) -> dict[str, Any]:
93
93
  return {"gearStatus": _enum(_GEAR_MAP, m.gear, what="gear")}
94
94
 
95
95
 
96
- # Some vehicles send the fix time as GPS time (milliseconds since the GPS
97
- # epoch, 1980-01-06, without leap seconds) instead of Unix time. Any time
98
- # before 2020 is taken as GPS time.
96
+ # Vehicles send the fix time in Unix milliseconds, Unix seconds, or GPS time
97
+ # (milliseconds since the GPS epoch, 1980-01-06, without leap seconds). Any
98
+ # time below 10^11 (1973 in ms, year 5138 in seconds) is taken as seconds, and
99
+ # then any time before 2020 as GPS time.
99
100
  _GPS_EPOCH_OFFSET_MS: Final = 315_964_800_000
100
101
  _GPS_LEAP_SECONDS_MS: Final = 18_000
101
102
  _GPS_TIME_CUTOFF_MS: Final = 1_577_836_800_000 # 2020-01-01 in Unix ms
103
+ _SECONDS_CUTOFF: Final = 100_000_000_000
102
104
 
103
105
 
104
106
  def _gnss_unix_ms(time: int) -> int:
105
107
  """A GNSS fix time as Unix epoch milliseconds."""
108
+ if 0 < time < _SECONDS_CUTOFF:
109
+ time *= 1000
106
110
  if 0 < time < _GPS_TIME_CUTOFF_MS:
107
111
  return time + _GPS_EPOCH_OFFSET_MS - _GPS_LEAP_SECONDS_MS
108
112
  return time
@@ -55,7 +55,7 @@ message Gnss {
55
55
  float position_vertical_error = 7; // meters
56
56
  float speed_error = 8; // m/s
57
57
  float bearing_error = 9; // degrees
58
- int64 time = 10; // epoch ms (Unix, or GPS on some vehicles); the whole fix
58
+ int64 time = 10; // Unix ms, Unix seconds or GPS ms, by vehicle; the whole fix
59
59
  }
60
60
 
61
61
  // dynamics.vehicle.location
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: rivian-python-client
3
- Version: 2.4.0
3
+ Version: 2.4.1
4
4
  Summary: Rivian API Client (Unofficial)
5
5
  Author-email: Brian Retterer <bretterer@gmail.com>, "J.R. Gutierrez" <jrgutier@gmail.com>, Nathan Spencer <natekspencer@gmail.com>, Trevor Mack <drummer8001@gmail.com>
6
6
  License-Expression: MIT
@@ -1,5 +1,5 @@
1
1
  rivian/__init__.py,sha256=m1arAfL3-WG5NQDkraIni2h-tGr-2nmltIabQetCFw8,207
2
- rivian/__version__.py,sha256=dR-oduO2bwSixGaYt6Y_HUAhG5f_sK-djy4s6GUfu-Y,171
2
+ rivian/__version__.py,sha256=WCCOP_Ds2mA_8uh2WKtHN-5TBEbt6vnAuEXnUAaxnok,171
3
3
  rivian/ble.py,sha256=ko-PBco51wqt-eJeILbXyJWOdZf87xh2uR-d3ls-4qc,5872
4
4
  rivian/const.py,sha256=rl9-Dmj0E74xviYhZ9-jcv-nJ_JYrwINOygYX35ol1w,7134
5
5
  rivian/exceptions.py,sha256=JVSOTzbfbIp4pobx9mFQm12m_qgVNV2p-Zp34m590Uw,969
@@ -15,7 +15,7 @@ rivian/parallax/command.py,sha256=6XAvYB5D3BsB4B5JyTEo05eAkJIGW0FkF9EzKe6BCIM,68
15
15
  rivian/parallax/core.py,sha256=VAt78QoGt8iGTzFOwWG0cTnYYyXBvPGrND1anFrLuIw,5913
16
16
  rivian/parallax/departure.py,sha256=SzgcYPG74TrkE7m4DhrspIlx2pcl7EcKowTJT7y0iDw,4244
17
17
  rivian/parallax/device_table.py,sha256=eTn3Ld-tLbil8VurrPfRWx6kwugKZ0YQPrWI6NdWi4Y,5757
18
- rivian/parallax/dynamics.py,sha256=F554PzA70_j32uG-8DBxsy3Lcc9QcVtTQ3N2eZbKG78,10480
18
+ rivian/parallax/dynamics.py,sha256=57ZTH02LmrPR2ZswaT-K7fElmpuwfDXoEwExaDWyEqU,10666
19
19
  rivian/parallax/energy.py,sha256=_y4T0YLuJggDwYd7TJdu-bpObY1Dr9SxcVwTovKlfP8,5356
20
20
  rivian/parallax/energy_edge_compute.py,sha256=V0WQTKzmMKmjL51BFgHhIKnXwa787KP-Dnk4rOtQTMc,6995
21
21
  rivian/parallax/gearguard_streaming.py,sha256=Nv8fDj6DbQVKby5MjCQE802Bv2bqSWE3y4gs6fK5KPA,2420
@@ -49,7 +49,7 @@ rivian/parallax/proto/departure_pb2.pyi,sha256=Jw8vfV8PtnsK-sDbpJmiJBNiK4xgDi2Tu
49
49
  rivian/parallax/proto/device_table.proto,sha256=A148tE-b6YJncWKdBmD4865d6rbCbGOmNRWE4ggGoFA,3550
50
50
  rivian/parallax/proto/device_table_pb2.py,sha256=QRjS6QBgKH3dwdlZfnIlxcg4SV2S0P0-huDtGy-KJm0,7881
51
51
  rivian/parallax/proto/device_table_pb2.pyi,sha256=8aUw8RA4ABAznz2N1jdkQyGHjF6sQmRy-5icp2vuKXE,9475
52
- rivian/parallax/proto/dynamics.proto,sha256=-_95KCsgy0sQZhgGkLE3EjVjR-P3GgiTyWlKsN70bBw,3879
52
+ rivian/parallax/proto/dynamics.proto,sha256=tD5N-xPR2uT0YakaYQ_jfFTRCETR9yYDdcsOD_6Zo1U,3882
53
53
  rivian/parallax/proto/dynamics_pb2.py,sha256=Qq2B5HtzjOMyLrXDvLOQbMNLRgKfPPoDlzmbhIV7Ooo,7948
54
54
  rivian/parallax/proto/dynamics_pb2.pyi,sha256=DIxe4iYHkTIv0TPPoKIA6dTkcv86MIbTFchr6qOg-88,10906
55
55
  rivian/parallax/proto/energy.proto,sha256=92m12j81W76K78bfMTFMQyF0fPEhYU0tC5-f1ZgSU3g,2469
@@ -97,6 +97,6 @@ rivian/parallax/proto/vehicle_pb2.pyi,sha256=uM5JxmmlviPjtUq1FFqyZ_i-ih28A46KIYU
97
97
  rivian/schemas/charging.graphql,sha256=YkaQbGtCDPtxGzmgNxOUHgYZKNDDtW7IipoaAFdGmGo,3061
98
98
  rivian/schemas/gateway.graphql,sha256=0ZJX5_bKHqLmk3rtpp9to9GwrdCxyTasMhxAPwEhsqI,17865
99
99
  rivian/schemas/orders.graphql,sha256=goM4x7gbkFHvpMf7XUv2cTkTKMaIicrT4JbIi07F_Do,4290
100
- rivian_python_client-2.4.0.dist-info/METADATA,sha256=knlFQc4KJGFXkrjIXcszPc3-F5psaq7LDbCgWywnWo0,2981
101
- rivian_python_client-2.4.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
102
- rivian_python_client-2.4.0.dist-info/RECORD,,
100
+ rivian_python_client-2.4.1.dist-info/METADATA,sha256=a6DIWNfmkDkwvPGL42qt5bmsFBvWLlxdFEEZogWW_00,2981
101
+ rivian_python_client-2.4.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
102
+ rivian_python_client-2.4.1.dist-info/RECORD,,