Giter VIP home page Giter VIP logo

pine_gestures's People

Contributors

buginacode avatar zschroeder6212 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

buginacode nk23x

pine_gestures's Issues

error compiling ....in pine_gestures.cpp: In function 'int ftoi(char*)': compiling from sxmo-pinephone-postmarketOS

pine64-pinephone:~/pine_gestures$ make
g++ -std=c++11 -o pine_gestures pine_gestures.cpp
In file included from /usr/include/c++/12.2.1/cstring:42,
from pine_gestures.cpp:22:
pine_gestures.cpp: In function 'int ftoi(char*)':
pine_gestures.cpp:54:24: error: cannot convert 'std::nullptr_t' to 'int' in return
54 | return NULL;
| ^~~~
pine_gestures.cpp:59:24: error: cannot convert 'std::nullptr_t' to 'int' in return
59 | return NULL;
| ^~~~
pine_gestures.cpp: In function 'int get_arg(int, char**, char*, char*)':
pine_gestures.cpp:179:20: warning: format not a string literal and no format arguments [-Wformat-security]
179 | sprintf(arg_value, argv[i+1]);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
pine_gestures.cpp: In function 'void usage(char*)':
pine_gestures.cpp:191:21: warning: format '%s' expects a matching 'char*' argument [-Wformat=]
191 | printf("Usage: %s [--shake_cmd ] [--twist_cmd ]\n");
| ~^
| |
| char*
pine_gestures.cpp: In function 'int main(int, char**)':
pine_gestures.cpp:204:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
204 | int ret = get_arg(argc, argv, "--shake_cmd", shake_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:213:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
213 | ret = get_arg(argc, argv, "--twist_cmd", twist_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:233:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
233 | if(find("/sys/bus/i2c/drivers/inv-mpu6050-i2c", "0068", IMU_path))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pine_gestures.cpp:233:53: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
233 | if(find("/sys/bus/i2c/drivers/inv-mpu6050-i2c", "0068", IMU_path))
| ^~~~~~
pine_gestures.cpp:235:28: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
235 | if(!find(IMU_path, "iio:device", IMU_path))
| ^~~~~~~~~~~~
pine_gestures.cpp:292:20: warning: format not a string literal and no format arguments [-Wformat-security]
292 | printf(shake_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:306:20: warning: format not a string literal and no format arguments [-Wformat-security]
306 | printf(twist_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp: In function 'bool find(char*, char*, char*)':
pine_gestures.cpp:87:1: warning: control reaches end of non-void function [-Wreturn-type]
87 | }
| ^
make: *** [Makefile:31: pine_gestures] Error 1

Different path for accelerometer

Awesome app!

On my pinephone I have a different path to the accelerometer. For me it was in /sys/bus/i2c/drivers/inv-mpu6050-i2c/1-0068/iio:device3/in_accel_y_raw

I'm running Mobian.

Maybe a simple search for in_accel_y_raw in /sys/bus/i2c/drivers/inv-mpu6050-i2c on startup is enough.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.