Giter Club home page Giter Club logo

aeyrium-sensor's People

Contributors

diegoveloper avatar ra9r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aeyrium-sensor's Issues

Event doesn't always cancel

Hi,

Great package but I'm seeing mixed results with cancelling the stream. I'm recording actions and my app grabs the pitch and roll at the start of a record session, then records events and deducts this first event from each record. I do this because the phone could be at any angle to start with and it needs to be normalised. So grabbing a first value of pitch and roll is vital, and hence I need the stream to close so it doesn't keep updating this value. I use:

_vectorStream = AeyriumSensor.sensorEvents.listen(
      (SensorEvent event) {
        if (event.pitch != null) {
          _sensorVectorOffset = Vector(event.pitch, event.roll);
          _vectorStream.cancel();
        }
      },
    );

Usually this works for the first four or five attempts and then after that it no longer closes the stream, and starts overriding this offset value.

Can you please advise what the issue is and how to close your stream consistently?

Luke

Roll sensor value jumps from 0 to ~ 2*pi on iPhone 8 when the phone lays flat.

I have used this library on android (emulator and real device without any problems), however on the iPhone 8 (physical device) the roll sensor value jumps from 0 to approximately 2*pi or 6.28... when the phone lays flat.
Whereas on android it changes from 1 to 0 to -1 for example, when i rotate the device.
I think, the library should give consistent results on android and iOS.
I would prefer it the android way. In the meantime I use this workaraound:

if(Platform.isIOS){
  if(event.roll < (-1)*pi){
    sensorValue = 2*pi+event.roll;
  } 
  else{         
    sensorValue = event.roll;
  }
} 
else{
  sensorValue = event.roll;     //roll in radians for android 
}

sensor or listener is null

Hi,

I've copied the example , then at the moment to run shows nothing on device!!

on my debug console says : E/SensorManager( 2627): sensor or listener is null

Can you help me with this, please?

The plugin aeyrium_sensor uses a deprecated version of the Android embedding

The plugin aeyrium_sensor uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

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.