diff options
Diffstat (limited to 'icetime')
-rw-r--r-- | icetime/icetime.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc index f9e0994..532d912 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -26,12 +26,13 @@ #include <string.h> #include <stdarg.h> +#include <algorithm> #include <functional> -#include <string> -#include <vector> -#include <tuple> #include <map> #include <set> +#include <string> +#include <tuple> +#include <vector> #ifdef __EMSCRIPTEN__ #include <emscripten.h> @@ -2331,6 +2332,8 @@ int main(int argc, char **argv) fflush(stdout); read_config(); + std::transform(config_device.begin(), config_device.end(), config_device.begin(), ::tolower); + if (device_type.empty()) { if(config_device == "5k") device_type = "up" + config_device; @@ -2339,6 +2342,8 @@ int main(int argc, char **argv) printf("// Warning: Missing -d parameter. Assuming '%s' device.\n", device_type.c_str()); } + std::transform(device_type.begin(), device_type.end(), device_type.begin(), ::tolower); + if (device_type == "lp384") { if (config_device != "384") goto device_chip_mismatch; |