Skip to content

Commit

Permalink
Store sysfreq in _config.
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Jan 30, 2024
1 parent 03aa6c2 commit cfbefaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pycbsdk/cbhw/device/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __init__(self, params: Params):
"proc_chans": 0,
"channel_infos": {},
"group_infos": {},
"sysfreq": None, # Should be 30_000 for legacy or 1e9 for Gemini PTP
}
self.config_callbacks = defaultdict(
lambda: []
Expand Down
2 changes: 2 additions & 0 deletions pycbsdk/cbhw/device/nsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def _handle_sysrep(self, pkt):
self._config["transport"] = pkt.transport # bitwise or'd flags
if b_general or pkt.header.type == CBPacketType.SYSREPRUNLEV:
self._config["runlevel"] = CBRunLevel(pkt.runlevel)
self._config["sysfreq"] = pkt.sysfreq
self._config_events["sysrep"].set()
if b_general or pkt.header.type == CBPacketType.SYSREPRUNLEV:
if self._config["runlevel"] == CBRunLevel.STANDBY:
Expand Down Expand Up @@ -569,6 +570,7 @@ def get_config(
# Clear out our existing config
self._config["proc_chans"] = 0
self._config["channel_infos"] = {}
self._config["sysfreq"] = None
time.sleep(0.1)
pkt = self.packet_factory.make_packet(
None,
Expand Down

0 comments on commit cfbefaa

Please sign in to comment.