MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / toSigned16

Function toSigned16

app/rcc/scripts/parser/js/modbus.js:108–110  ·  view source on GitHub ↗

* Converts an unsigned 16-bit value to signed.

(value)

Source from the content-addressed store, hash-verified

106 * Converts an unsigned 16-bit value to signed.
107 */
108function toSigned16(value) {
109 return value > 0x7FFF ? value - 0x10000 : value;
110}
111
112/**
113 * Combines two 16-bit registers into a 32-bit value.

Callers 1

processValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected