Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redeclaration of 'LIS3DH_RANGE_4_G' #12

Open
pwdel opened this issue Nov 6, 2016 · 12 comments
Open

redeclaration of 'LIS3DH_RANGE_4_G' #12

pwdel opened this issue Nov 6, 2016 · 12 comments

Comments

@pwdel
Copy link

pwdel commented Nov 6, 2016

Veryfing code using this library in Particle Build fails with this error:

AssetTracker/AssetTracker.h:431:32: error: redeclaration of 'LIS3DH_RANGE_4_G'
   LIS3DH_RANGE_4_G           = 0b01,   //  /- 4g
                                ^
@Brianmerle
Copy link

Did you have any luck with this error? I'm working on the electron tracker with altitude and i have the same error.

Thanks!

@kennethlimcp
Copy link

@Brianmerle how are you using the library and which example code did you use?

@Brianmerle
Copy link

Brianmerle commented May 25, 2018 via email

@kennethlimcp
Copy link

kennethlimcp commented May 26, 2018

Hello @Brianmerle,

it looks like the AssetTracker.h and AssetTracker.cpp are symlinks so i cannot compile Tracker2.ino successfully.

I would also recommend renaming your AssetTracker.* files to another name since it clashes with the AssetTracker.* of the library itself.

@Brianmerle
Copy link

I will rename the AssetTracker files to something else.
Aren't these the actual files? https://github.com/habeducation/AssetTracker/tree/master/firmware I'm confused about the symlink. In the tree he has the symlinks changed to actual files.

Thanks for your help!

@kennethlimcp
Copy link

@kennethlimcp
Copy link

Are you using the Web IDE or CLI to compile code?

I am guessing that you did the following:

  1. Added the official AssetTracker library to the project
  2. Created a AssetTracker.h and AssetTracker.cpp file and got the contents from https://github.com/habeducation/AssetTracker

If you want to use the AssertTracker library from https://github.com/habeducation/AssetTracker,
you won't need to include the official AssetTracker library.

Using the CLI, i managed to compile using your AssetTracker.h/cpp and Tracker2.ino files:

$ ls -l
-rw-r--r--  1 kennethlimcp  staff  25411 May 26 20:07 AssetTracker.cpp
-rw-r--r--  1 kennethlimcp  staff  17055 May 26 20:07 AssetTracker.h
-rw-r--r--  1 kennethlimcp  staff   5313 May 26 20:08 Tracker2.ino
-rw-r--r--  1 kennethlimcp  staff  24212 May 26 20:08 photon_firmware_1527336499593.bin

$ pcp

Compiling code for photon

Including:
    AssetTracker.h
    Tracker2.ino
    AssetTracker.cpp
attempting to compile firmware 
downloading binary from: /v1/binaries/5b094e38632000662a7e94d6
saving to: photon_firmware_1527336499593.bin
Memory use: 
   text	   data	    bss	    dec	    hex	filename
  24028	    184	   1776	  25988	   6584	/workspace/target/workspace.elf

Compile succeeded.
Saved firmware to: /Users/kennethlimcp/Desktop/AssetTrackerTest/photon_firmware_1527336499593.bin

@Brianmerle
Copy link

I was using the web IDE. I can try using CLI. Thanks for looking into this!

@kennethlimcp
Copy link

kennethlimcp commented May 26, 2018

You don't need to switch over to CLI. Just remove the AssetTracker library from that project and it should work fine.

screen shot 2018-05-26 at 20 18 04

@Brianmerle
Copy link

OK. I'll try that this evening after work.

@Brianmerle
Copy link

I was able to flash it, thanks! There seems to be some issues as I am not getting GPS or altitude readings but am able to get battery readings and change settings like frequency of location updates via a web page. The creator is thinking that there may be hardware changes from the V1 to V2 so that the code may need to be modified.

@kennethlimcp
Copy link

@Brianmerle you might need to sync up the https://github.com/habeducation/AssetTracker repository with newer commits from this repository or simply try out the examples from this repository before using the customized one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants