node-mavlink icon indicating copy to clipboard operation
node-mavlink copied to clipboard

Improved enum access capabilities

Open teijeong opened this issue 9 years ago • 0 comments

Actual values of enums can be accessed by enumsByName of enumsByValue.

Usage:

var value = enumsByName.ENUM_NAME.PROPERTY_NAME.value;
var name = enumsByValue.ENUM_NAME[PROPERTY_VALUE].name;

Specifying .value or .name is to preserve descriptions along with the value or name in the same key

teijeong avatar Jun 10 '16 08:06 teijeong