Last active
April 21, 2018 21:08
-
-
Save dabear/d8dca03d7095cd711289737cca5b1106 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// These are the default values used for AlgorithmRunner.RunAlgorithm | |
// | |
// This is the default state. If you scan the sensor during the first hour of warmup, this is what will be returned by dataprocessingnative.getNewState(internal function provided by abbot) | |
// This also means that every call to the libreoopalgo acts like it's the first time scanning the sensor | |
// if you want to behave in a "proper" way, you should always save the newState after a scan and feed that as oldState to the next run of AlgorithmRunner.RunAlgorithm | |
// An obvious exception to this, is when changing sensors. When changing sensors, you should feed the algo with null (which is the same as feeding it with the oldState1 below) | |
byte[] oldState1 = {(byte) 0xff, (byte) 0xff, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, | |
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, | |
(byte) 0xff, (byte) 0xff, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, | |
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00}; | |
// Uncertain as to which format this is on | |
// These values are set by tzachi-dar. sensorScanTimestamp should always be higher than sensorStartTimestamp | |
int sensorStartTimestamp=0x0e181349; | |
int sensorScanTimestamp=0x0e1c4794; | |
// This seems to be in milliseconds, and equals 3600000 (1 hour in decimal | |
int currentUtcOffset = 0x0036ee80; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment