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

pybricks / pybricks-micropython / 6675885095

28 Oct 2023 08:38AM UTC coverage: 56.053% (+10.0%) from 46.074%
6675885095

push

github

laurensvalk
pybricks.hubs.MoveHub: Use standard hub init.

The Move Hub cannot have true vector axes, but we can still use this API to initialize the hub using numeric indices.

This ensures we can use the custom orientation not just in tilt, but also in acceleration like we do on other hubs.

3616 of 6451 relevant lines covered (56.05%)

20895680.75 hits per line

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

0.0
/lib/pbio/sys/program_load.h
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) 2022 The Pybricks Authors
3

4
#ifndef _PBSYS_SYS_PROGRAM_LOAD_H_
5
#define _PBSYS_SYS_PROGRAM_LOAD_H_
6

7
#include <stdint.h>
8

9
#include <pbio/error.h>
10
#include <pbsys/config.h>
11
#include <pbsys/main.h>
12

13
#if PBSYS_CONFIG_PROGRAM_LOAD
14

15
void pbsys_program_load_init(void);
16
void pbsys_program_load_deinit(void);
17
pbio_error_t pbsys_program_load_wait_command(pbsys_main_program_t *program);
18
pbio_error_t pbsys_program_load_set_program_size(uint32_t size);
19
pbio_error_t pbsys_program_load_set_program_data(uint32_t offset, const void *data, uint32_t size);
20
pbio_error_t pbsys_program_load_start_user_program(void);
21
pbio_error_t pbsys_program_load_start_repl(void);
22

23
#else
24
static inline void pbsys_program_load_init(void) {
×
25
}
×
26
static inline void pbsys_program_load_deinit(void) {
×
27
}
×
28
static inline pbio_error_t pbsys_program_load_wait_command(pbsys_main_program_t *program) {
29
    return PBIO_ERROR_NOT_SUPPORTED;
30
}
31
static inline pbio_error_t pbsys_program_load_set_program_size(uint32_t size) {
×
32
    return PBIO_ERROR_NOT_SUPPORTED;
×
33
}
34
static inline pbio_error_t pbsys_program_load_set_program_data(uint32_t offset, const void *data, uint32_t size) {
×
35
    return PBIO_ERROR_NOT_SUPPORTED;
×
36
}
37
static inline pbio_error_t pbsys_program_load_start_user_program(void) {
×
38
    return PBIO_ERROR_NOT_SUPPORTED;
×
39
}
40
static inline pbio_error_t pbsys_program_load_start_repl(void) {
×
41
    return PBIO_ERROR_NOT_SUPPORTED;
×
42
}
43

44
#endif // PBSYS_CONFIG_PROGRAM_LOAD
45

46
#endif // _PBSYS_SYS_PROGRAM_LOAD_H_
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