Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

Fork and Use Different Version of Mongoose OS Library

edited October 2017 in Mongoose OS

Hello All,

I am trying to fork and use a custom version of the I2C library for Mongoose, which is just a fork of the older one. See here for it https://github.com/applecrusher/i2c/. I would like to use this instead of the one used for version 1.18 which it defaults to now. I have tried naming the new edits I would like to version 1.18, and have tried naming it version 1.19, but with no success. It still gives me the original 1.18 version when I build it and use this url. Am I missing something simple?

Comments

  • Never mind. Sleep deprived me eventually figured out the obvious

  • cctroniccctronic United States

    @applecrusher
    I have similar issue, II forked library and changed few things but i can't seems to make the compiler use it.
    i'm not expert in this and this is my first time to try it.
    can you give me an idea how to solve this.

    thanks.

  • nliviunliviu Romania
    edited July 2018

    If your library is on github, you change the - origin: path in mos.yml to point to your version.

    If it's local, you must have docker installed. - origin: should point to the local path of the library. Run mos build --local --platform esp32

    Thanked by 1cctronic
  • cctroniccctronic United States

    @nliviu
    my library is on github : https://github.com/lidraikh/arduino-adafruit-ads1x15
    I did the same thing you said.

    - origin: https://github.com/lidraikh/arduino-adafruit-ads1x15

    but still think its referencing to the original one which is this one https://github.com/mongoose-os-libs/arduino-adafruit-ads1x15

    to confirm based on my knowledge that if you used --local it will download all libraries, i used the local build command, and for some reason it downloaded the original one not the one I trying to use.

    it may help to know that i'm using the Vs-code with mongoose plug in

  • nliviunliviu Romania

    Your library does not compile:

    arduino-adafruit-ads1x15/src/mgos_arduino_Adafruit_ADS1015.cpp:2:43: fatal error: mgos_arduino_Adafruit_ADS1015.h: No such file or  directory
    

    You moved the .h files in the include directory but did not add

    includes:
      - include
    

    in mos.yml

    Thanked by 1cctronic
  • @cctronic Also, make sure you delete the old dependencies in your deps folder before running the build command. That was another issue I figured out along the way

    Thanked by 1cctronic
  • cctroniccctronic United States

    @nliviu & @applecrusher

    Thank you very much it compile now, and using local build it passed most other errors i was facing.

    the only thing I have issue with now is

    deps/arduino-adafruit-ads1x15/include/mgos_arduino_Adafruit_ADS1015.h:85:50: error: unknown type name 'adsGain_t'
     void mgos_ADS1015_setGain(Adafruit_ADS1015 *ads, adsGain_t gain);
    

    we try to work on it, if did not work will add another post for it. if you have any idea your help is appreciated.

  • That looks like you may need to add another header file or include another library.

  • cctroniccctronic United States

    @applecrusher

    I started a new post so i want confuse people who check here.

    you can find more details about the issue there.

Sign In or Register to comment.