Class: HMC5883L

Inherits:
Object
  • Object
show all
Defined in:
ext/bonekit/hmc5883l_class.c

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.newObject



43
44
45
46
47
48
# File 'ext/bonekit/hmc5883l_class.c', line 43

static VALUE HMC5883L_new(VALUE class)
{
  hmc5883l_t * ptr = hmc5883l_create();
  VALUE wrap_struct = Data_Wrap_Struct(class, 0, HMC5883L_free, ptr);
  return wrap_struct;
}

Instance Method Details

#headingObject



50
51
52
53
54
55
56
57
# File 'ext/bonekit/hmc5883l_class.c', line 50

static VALUE HMC5883L_heading(VALUE self)
{
  double value = 0.0f;
  hmc5883l_t * ptr;
  Data_Get_Struct(self, hmc5883l_t, ptr);
  value = hmc5883l_heading(ptr);
  return rb_float_new(value);
}