@springfield/radio-module-baofeng
Version:
Radio module for Baofeng UV-5R series ham radios
10 lines (9 loc) • 424 B
JavaScript
import { DCS } from '@springfield/ham-radio-api';
export const dcsValues = Object.values(DCS).filter(value => typeof value === 'number');
export const dcsByValue = new Map(); // index -> DCS value
export const valuesByDcs = new Map(); // DCS value -> index
for (let index = 0; index < dcsValues.length; index += 1) {
const value = dcsValues[index];
dcsByValue.set(index, value);
valuesByDcs.set(value, index);
}