Module: Toybox::Activity

Overview

The Activity module provides a way to retrieve available info for the current activity.

Activity Info is automatically provided by the compute() method in Data Fields. The getActivityInfo() method is available for use within apps or in other cases, such as data field initialization.

This module also provides two sets of constants:

  • SWIM_STROKE: Indicates the swimStrokeType(), such as freestyle, backstroke, or butterfly.

  • TIMER_STATE: Indicates the activity recording timerState(), such as stopped, started, paused, etc.

Since:

  • 1.0.0

Defined Under Namespace

Classes: Info

Constant Summary

SWIM_STROKE_FREESTYLE = 0

Freestyle stroke

Since:

  • 1.2.2

SWIM_STROKE_BACKSTROKE = 1

Backstroke

Since:

  • 1.2.2

SWIM_STROKE_BREASTSTROKE = 2

Breaststroke

Since:

  • 1.2.2

SWIM_STROKE_BUTTERFLY = 3

Butterfly stroke

Since:

  • 1.2.2

SWIM_STROKE_DRILL = 4

Drill mode

Since:

  • 1.2.2

SWIM_STROKE_MIXED = 5

Mixed stroke mode

Since:

  • 1.2.2

SWIM_STROKE_IM = 6

Mixed interval with equal number of butterfly, backstroke, breaststroke, and freestyle, in that order.

Since:

  • 1.2.2

TIMER_STATE_OFF = 0

The timer is off. There is not an active recording

Since:

  • 2.1.0

TIMER_STATE_STOPPED = 1

The timer is stopped. The recording is active, with the timer stopped.

Since:

  • 2.1.0

TIMER_STATE_PAUSED = 2

The timer is paused. The recording is active with the timer paused. This state occurs when the timer is active, but has been stopped with the Auto-Pause feature.

Since:

  • 2.1.0

TIMER_STATE_ON = 3

The timer is on. The recording is active and the timer is running.

Since:

  • 2.1.0

Instance Method Summary collapse

Instance Method Details

getActivityInfoToybox::Activity::Info

Get the current Activity Info.

Returns:

Since:

  • 1.0.0


74
75
# File 'Monkeybrains.rb', line 74

def getActivityInfo()
end