Skip to content

Commit

Permalink
format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
makrsmark committed Aug 2, 2024
1 parent b6e4ad8 commit 88f20d9
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions lib/plugins/Label_H1_OHMA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ export class Label_H1_OHMA extends DecoderPlugin {
const data = message.text.slice(4);

try {
const compressedBuffer = Buffer.from(data, 'base64');
const decompress = new zlib.Inflate({windowBits: 15});
decompress.write(compressedBuffer);
decompress.flush(zlib.constants.Z_SYNC_FLUSH);
const result = decompress.read();
const jsonText = result.toString();
const json = JSON.parse(jsonText);
const ohmaMsg = JSON.parse(json.message);

decodeResult.decoded = true;
decodeResult.decoder.decodeLevel = 'full';
decodeResult.raw.ohma = jsonText;
decodeResult.formatted.items.push({
type: 'ohma',
code: 'OHMA' ,
label: 'OHMA Downlink',
value: JSON.stringify(ohmaMsg, null, 2)
});
const compressedBuffer = Buffer.from(data, 'base64');
const decompress = new zlib.Inflate({windowBits: 15});
decompress.write(compressedBuffer);
decompress.flush(zlib.constants.Z_SYNC_FLUSH);
const result = decompress.read();
const jsonText = result.toString();
const json = JSON.parse(jsonText);
const ohmaMsg = JSON.parse(json.message);

decodeResult.decoded = true;
decodeResult.decoder.decodeLevel = 'full';
decodeResult.raw.ohma = jsonText;
decodeResult.formatted.items.push({
type: 'ohma',
code: 'OHMA' ,
label: 'OHMA Downlink',
value: JSON.stringify(ohmaMsg, null, 2)
});
} catch {
// Unknown
if (options.debug) {
Expand Down

0 comments on commit 88f20d9

Please sign in to comment.