MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / ether_rot_set_level

Function ether_rot_set_level

rotators/ether6/ether6.c:330–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328
329
330static int ether_rot_set_level(ROT *rot, setting_t level, value_t val)
331{
332 struct rot_state *rs = ROTSTATE(rot);
333
334 rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rot_strlevel(level));
335
336 switch (level)
337 {
338 case ROT_LEVEL_SPEED:
339 {
340 int speed = val.i;
341
342 if (speed < 1)
343 {
344 speed = 1;
345 }
346 else if (speed > 100)
347 {
348 speed = 100;
349 }
350
351 rs->current_speed = speed;
352 break;
353 }
354
355 default:
356 return -RIG_ENAVAIL;
357 }
358
359 return RIG_OK;
360}
361
362
363

Callers

nothing calls this directly

Calls 2

rig_debugFunction · 0.85
rot_strlevelFunction · 0.85

Tested by

no test coverage detected