Skip to content

invalid conversion #5

Closed
Closed

Description

@NagyAlmosTas

Describe the bug

In file included from c:\Users\Uplink\Documents\Arduino\libraries\M5Module-GNSS\src/M5Module_GNSS.h:7,
from C:\Users\Uplink\AppData\Local\Temp.arduinoIDE-unsaved202556-19896-1vs7bpq.6hue\getSensorData\getSensorData.ino:16:
c:\Users\Uplink\Documents\Arduino\libraries\M5Module-GNSS\src/BMI270.h:39:31: error: invalid conversion from 'int' to 'i2c_port_t' [-fpermissive]
39 | i2c_port_t i2c_port = 0;
| ^
| |
| int
exit status 1

Compilation error: exit status 1

To reproduce

Arduino IDE, M5 stack base libs installed.
@file getSensorData.ino

Expected behavior

Compile

Screenshots

No response

Environment

  • OS:
  • IDE &IDE Version:
  • Repository Version:

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • My report contains all necessary details

Activity

  1. RikerZhu commented on Dec 19, 2025

    @RikerZhu
    Contributor

    Fixed!

  2. Onzeisnottwice commented on May 2, 2026

    @Onzeisnottwice

    Uh, how did you fix it and where? I have the same error with the latest version of M5Module_GNSS. Thanks

  3. RikerZhu commented on May 6, 2026

    @RikerZhu
    Contributor

    Uh, how did you fix it and where? I have the same error with the latest version of M5Module_GNSS. Thanks

    As you can see in the commit: 1aaf0d6
    I have checked again with the latest version of M5Stack both board manager and library, M5Module-GNSS, the compiling was successed.

  4. devilSatou commented on Oct 15, 2026

    @devilSatou

    thanks for the fix in 1aaf0d6! It is on main, but it hasn't been released yet, which explains why some people still see this error.

    The latest tag is still 1.0.1 (b442dc9, September 2023), and it predates the fix. So the Arduino Library Manager and the PlatformIO registry both still install a BMI270.h with:

    i2c_port_t i2c_port = 0;

    That's why compiling against main works, but installing "the latest version" through a library manager still fails.

    I've opened #7 to bump the version to 1.0.2. Once it's merged and tagged, the fix should reach library-manager users.

    Note that on Arduino core 3.2+ the code on main compiles but still aborts at startup because of #4; #8 fixes that.

  5. weekroom commented on Oct 27, 2026

    @weekroom
    Contributor

    Version 1.0.3 has fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions