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

pybricks / pybricks-micropython / 19016791193

02 Nov 2025 06:40PM UTC coverage: 57.167% (-2.6%) from 59.744%
19016791193

Pull #406

github

laurensvalk
bricks/virtualhub: Replace with embedded simulation.

Instead of using the newly introduced simhub alongside the virtualhub, we'll just replace the old one entirely now that it has reached feature parity. We can keep calling it the virtualhub.
Pull Request #406: New virtual hub for more effective debugging

41 of 48 new or added lines in 7 files covered. (85.42%)

414 existing lines in 53 files now uncovered.

4479 of 7835 relevant lines covered (57.17%)

17178392.75 hits per line

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

0.0
/lib/pbio/src/error.c
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) 2018-2021 The Pybricks Authors
3

4
#include <stddef.h>
5

6
#include <pbio/error.h>
7

8
/**
9
 * Gets a string describing an error.
10
 * @param [in]  err     The error code
11
 * @return              A string describing the error or *NULL*
12
 */
UNCOV
13
const char *pbio_error_str(pbio_error_t err) {
×
UNCOV
14
    switch (err) {
×
UNCOV
15
        case PBIO_SUCCESS:
×
UNCOV
16
            break;
×
UNCOV
17
        case PBIO_ERROR_FAILED:
×
UNCOV
18
            return "Unknown error";
×
UNCOV
19
        case PBIO_ERROR_INVALID_ARG:
×
UNCOV
20
            return "Invalid argument";
×
21
        case PBIO_ERROR_IO:
×
22
            return "I/O error";
×
23
        case PBIO_ERROR_BUSY:
×
24
            return "Device or resource busy";
×
25
        case PBIO_ERROR_NO_DEV:
×
26
            return "Device not connected";
×
27
        case PBIO_ERROR_NOT_IMPLEMENTED:
×
28
            return "Not implemented";
×
29
        case PBIO_ERROR_NOT_SUPPORTED:
×
30
            return "Not supported";
×
31
        case PBIO_ERROR_AGAIN:
×
32
            return "Try again later";
×
33
        case PBIO_ERROR_INVALID_OP:
×
34
            return "Invalid operation";
×
35
        case PBIO_ERROR_TIMEDOUT:
×
36
            return "Timed out";
×
37
        case PBIO_ERROR_CANCELED:
×
38
            return "Canceled";
×
39
    }
40

41
    return NULL;
×
42
}
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

© 2025 Coveralls, Inc