So far we hard coded /dev/ttyUSB0 - which is a good starting point in
Linux but not so useful on Windows or MacOS. This was now moved into one
of our OS helper functions with (somewhat) reasonable defaults.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
extern const void *subsurface_get_conf(char *name, pref_type_t type);
extern void subsurface_close_conf(void);
+extern const char *subsurface_USB_name(void);
+
extern visible_cols_t visible_cols;
extern const char *divelist_font;
entry = gtk_entry_new();
gtk_container_add(GTK_CONTAINER(frame), entry);
- gtk_entry_set_text(GTK_ENTRY(entry), "/dev/ttyUSB0");
+ gtk_entry_set_text(GTK_ENTRY(entry), subsurface_USB_name());
return GTK_ENTRY(entry);
}
{
/* this is a no-op */
}
+
+const char *subsurface_USB_name()
+{
+ return("/dev/ttyUSB0");
+}
CFRelease(xmlData);
CFRelease(propertyList);
}
+
+const char *subsurface_USB_name()
+{
+ return("/dev/tty.SLAB_USBtoUART");
+}
printf("RegFlushKey failed \n");
RegCloseKey(hkey);
}
+
+const char *subsurface_USB_name()
+{
+ return("COM3");
+}