_calibrateButton.setChangeListener(this);
buttonManager.add(_snapshotButton);
buttonManager.add(_calibrateButton);
add(buttonManager);
add(new SeparatorField());
// Add fields for displaying snapshot data
_snapshotManager = new VerticalFieldManager();
_snapshotHeadingField = new TextField("Snapshot heading: ", "");
_snapshotAngleField = new TextField("Snapshot angle: ", "");
_snapshotStrengthField = new TextField("Snapshot field strength: ", "");
_snapshotQualityField =
new TextField("Snapshot calibration quality: ", "");
_snapshotQuaternionField = new TextField("Snapshot quaternion: ", "");
_snapshotManager.add(_snapshotHeadingField);
_snapshotManager.add(_snapshotAngleField);
_snapshotManager.add(_snapshotQuaternionField);
_snapshotManager.add(_snapshotStrengthField);
_snapshotManager.add(_snapshotQualityField);
_snapshotManager.setPadding(4, 4, 4, 4);
add(_snapshotManager);
add(new SeparatorField());
// The magnetometer channel will be opened with a sampling
// frequency of 10 hertz and will be active only when the app
// is in the foreground. This is the default configuration
// that would be set automatically if the no arg constructor