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

Int16 parsing in decentScale.ts #901

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

banoz
Copy link

@banoz banoz commented Feb 5, 2025

Tested on MDN with samples from API

//const arr = new Uint8Array([0x03,0xCE,0x00,0x00,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x00,0x65,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x07,0x94,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x1B,0x93,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x2B,0xAC,0x00,0x00,0xCD]);
const arr = new Uint8Array([0x03,0xCE,0xFF,0x6A,0x00,0x00,0xCD]);

//const arr = new Uint8Array([0x03,0xCE,0x00,0x00,0x01,0x02,0x03,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x00,0x65,0x01,0x02,0x04,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x07,0x94,0x01,0x02,0x05,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x1B,0x93,0x01,0x02,0x06,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0x2B,0xAC,0x01,0x02,0x07,0x00,0x00,0xCD]);
//const arr = new Uint8Array([0x03,0xCE,0xFF,0x6A,0x01,0x02,0x03,0x00,0x00,0xCD]);

const view = new DataView(arr.buffer);

console.log(view.getInt16(2, false)); 

@CLAassistant
Copy link

CLAassistant commented Feb 5, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

sonarqubecloud bot commented Feb 5, 2025

graphefruit added a commit that referenced this pull request Feb 9, 2025
@graphefruit
Copy link
Owner

Thank you for the PR, I'll build an APK next week and sent it to you for testing

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

Successfully merging this pull request may close these issues.

3 participants