void evfd::vfd_set_icon(tvfd_icon id, bool onoff, bool force) { if (getVfdType() != 4) { icon_onoff[id] = onoff; if (!blocked || force) { #if defined(PLATFORM_SPARK) || defined(PLATFORM_SPARK7162) struct set_icon_s data; #else struct vfd_ioctl_data data; #endif if (!startloop_running) { #if defined(PLATFORM_SPARK) || defined(PLATFORM_SPARK7162) memset(&data, 0, sizeof(struct set_icon_s)); data.icon_nr=id; data.on = onoff; #else memset(&data, 0, sizeof(struct vfd_ioctl_data)); data.start = 0x00; data.data[0] = id; data.data[4] = onoff; data.length = 5; #endif file_vfd = open (VFD_DEVICE, O_WRONLY); ioctl(file_vfd, VFDICONDISPLAYONOFF, &data); close (file_vfd); } } } return; }
void evfd::vfd_clear_icons() { if (getVfdType() != 4) { for (int id = 1; id <= 45; id++) { vfd_set_icon((tvfd_icon)id, false); } } return; }
void evfd::vfd_set_brightness(unsigned char setting) { if (getVfdType() != 4) { struct vfd_ioctl_data data; memset(&data, 0, sizeof(struct vfd_ioctl_data)); data.start = setting & 0x07; data.length = 0; file_vfd = open (VFD_DEVICE, O_WRONLY); ioctl ( file_vfd, VFDBRIGHTNESS, &data ); close (file_vfd); } return; }
void evfd::vfd_set_icon(tvfd_icon id, bool onoff, bool force) { if (getVfdType() != 4) { icon_onoff[id] = onoff; if (!blocked || force) { struct set_icon_s data; if (!startloop_running) { memset(&data, 0, sizeof(struct set_icon_s)); data.icon_nr=id; data.on = onoff; file_vfd = open (VFD_DEVICE, O_WRONLY); ioctl(file_vfd, VFDICONDISPLAYONOFF, &data); close (file_vfd); } } } return; }
void evfd::vfd_set_icon(tvfd_icon id, bool onoff) { if (getVfdType() != 4) vfd_set_icon(id, onoff, false); }