thermferm/devices.c

changeset 713
ea24b4ce02b1
parent 711
844588d0df65
child 714
24749c296a50
equal deleted inserted replaced
712:93a87fe230cc 713:ea24b4ce02b1
694 } 694 }
695 695
696 /* 696 /*
697 * Create simulated devices, or upgrade with new devices. 697 * Create simulated devices, or upgrade with new devices.
698 */ 698 */
699 subdevices = 9; 699 subdevices = 10;
700 for (i = found; i < subdevices; i++) { 700 for (i = found; i < subdevices; i++) {
701 ndev = (devices_list *)malloc(sizeof(devices_list)); 701 ndev = (devices_list *)malloc(sizeof(devices_list));
702 ndev->next = NULL; 702 ndev->next = NULL;
703 ndev->uuid = malloc(37); 703 ndev->uuid = malloc(37);
704 uuid_generate(uu); 704 uuid_generate(uu);
745 ndev->description = xstrcpy((char *)"Simulated fan"); 745 ndev->description = xstrcpy((char *)"Simulated fan");
746 break; 746 break;
747 case 8: ndev->direction = DEVDIR_OUT_BIN; 747 case 8: ndev->direction = DEVDIR_OUT_BIN;
748 ndev->address = xstrcpy((char *)"SimLight"); 748 ndev->address = xstrcpy((char *)"SimLight");
749 ndev->description = xstrcpy((char *)"Simulated light"); 749 ndev->description = xstrcpy((char *)"Simulated light");
750 break;
751 case 9: ndev->direction = DEVDIR_IN_ANALOG;
752 ndev->address = xstrcpy((char *)"SimBeerTemp2");
753 ndev->description = xstrcpy((char *)"Simulated beer temperature (alt)");
750 break; 754 break;
751 } 755 }
752 756
753 syslog(LOG_NOTICE, "New Simulator device %s, subdevice %d, %s", ndev->address, ndev->subdevice, ndev->description); 757 syslog(LOG_NOTICE, "New Simulator device %s, subdevice %d, %s", ndev->address, ndev->subdevice, ndev->description);
754 758

mercurial