MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / getAccelSensitivity

Method getAccelSensitivity

libraries/GY521/GY521.cpp:374–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372
373
374uint8_t GY521::getAccelSensitivity()
375{
376 uint8_t val = getRegister(GY521_ACCEL_CONFIG);
377 if (_error != GY521_OK)
378 {
379 return _error; // return and propagate error (best thing to do)
380 }
381 _afs = (val >> 3) & 3;
382 return _afs;
383}
384
385
386bool GY521::setGyroSensitivity(uint8_t gs)

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64