Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some addition for writing calibration into device. #26

Closed
Am6er opened this issue Jan 24, 2024 · 1 comment
Closed

Some addition for writing calibration into device. #26

Am6er opened this issue Jan 24, 2024 · 1 comment

Comments

@Am6er
Copy link

Am6er commented Jan 24, 2024

Hi! Some addition for writing calibration into RC device.
Sorry i'm too lazy to do PR. :(

    def set_energy_calib(self, calib: List[float]) -> None:
        calib_b = struct.pack('<fff', calib[0], calib[1], calib[2])
        calib_len = len(calib_b)
        payload = struct.pack('<II', int(VS.ENERGY_CALIB), calib_len) + calib_b
        r = self.execute(b'\x27\x08', payload)
        retcode = r.unpack('<I')[0]
        assert retcode == 1
@cdump
Copy link
Owner

cdump commented Jan 25, 2024

thanks, in master

@cdump cdump closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants