• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atomic14 / web-serial-plotter / 18927554430

30 Oct 2025 02:04AM UTC coverage: 60.213% (-1.0%) from 61.184%
18927554430

Pull #22

github

web-flow
Merge 6f890ce49 into ae73642b7
Pull Request #22: Feature: Add COBS-encoded float32 support

421 of 537 branches covered (78.4%)

Branch coverage included in aggregate %.

18 of 128 new or added lines in 4 files covered. (14.06%)

1 existing line in 1 file now uncovered.

2064 of 3590 relevant lines covered (57.49%)

33.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.0
/src/utils/cobsDecoder.ts
1
export class COBSDecoderError extends Error {
1✔
2
  constructor(message?: string) {
1✔
NEW
3
      super(message);
×
NEW
4
      this.name = "COBSDecoderError";
×
NEW
5
  }
×
6
}
1✔
7

8

9
export function decodeCOBS(data: Array<number>) {
1✔
NEW
10
  const output: Array<number> = []
×
NEW
11
  let i = 0
×
12

NEW
13
  while (i < data.length) {
×
NEW
14
    const code = data[i]
×
NEW
15
    if (code === 0 || i + code > data.length + 1) {
×
NEW
16
      throw new COBSDecoderError("Invalid COBS data")
×
NEW
17
    }
×
18

NEW
19
    const nextBlockEnd = i + code
×
NEW
20
    for (let j = i + 1; j < nextBlockEnd && j < data.length; j++) {
×
NEW
21
      output.push(data[j])
×
NEW
22
    }
×
23

NEW
24
    if (code < 0xFF && nextBlockEnd < data.length) {
×
NEW
25
      output.push(0x00)
×
NEW
26
    }
×
27

NEW
28
    i = nextBlockEnd
×
NEW
29
  }
×
30

NEW
31
  return Uint8Array.from(output)
×
NEW
32
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc