Commit 2956cfa1 authored by Michael Ott's avatar Michael Ott
Browse files

Add kW and MW to unitconv

parent 2c9d4b4d
......@@ -54,9 +54,11 @@ typedef enum {
/* 1e3 */
Unit_KiloHertz,
Unit_KiloWatt,
/* 1e6 */
Unit_MegaHertz,
Unit_MegaWatt,
/* 1e9 */
Unit_GigaHertz,
......
......@@ -99,19 +99,21 @@ ConversionTableEntry conversionTable[] = {
/* 14 */ { Unit_Watt, "W", Unit_Watt, 1, 0 },
/* 15 */ { Unit_MilliWatt, "mW", Unit_Watt, -1000, 0 },
/* 16 */ { Unit_MicroWatt, "uW", Unit_Watt, -1000000, 0 },
/* 17 */ { Unit_Volt, "V", Unit_Volt, 1, 0 },
/* 18 */ { Unit_MilliVolt, "mV", Unit_Volt, -1000, 0 },
/* 19 */ { Unit_MicroVolt, "uV", Unit_Volt, -1000000, 0 },
/* 20 */ { Unit_Celsius, "C", Unit_MilliKelvin, 1000, 273150 },
/* 21 */ { Unit_DeciCelsius, "dC", Unit_Celsius, -10, 273150 },
/* 22 */ { Unit_CentiCelsius, "cC", Unit_Celsius, -100, 0},
/* 23 */ { Unit_MilliCelsius, "mC", Unit_Celsius, -1000, 0 },
/* 24 */ { Unit_MicroCelsius, "uC", Unit_Celsius, -1000000, 0},
/* 25 */ { Unit_Fahrenheit, "F", Unit_MilliKelvin, 555, 255116 },
/* 26 */ { Unit_Hertz, "Hz", Unit_Hertz, 1, 0},
/* 27 */ { Unit_KiloHertz, "kHz", Unit_Hertz, 1000, 0},
/* 28 */ { Unit_MegaHertz,"MHz", Unit_Hertz, 1000000, 0},
/* 29 */ { Unit_GigaHertz, "GHz", Unit_Hertz, 1000000000, 0},
/* 17 */ { Unit_KiloWatt, "kW", Unit_Watt, 1000, 0 },
/* 18 */ { Unit_MegaWatt, "MW", Unit_Watt, 1000000, 0 },
/* 19 */ { Unit_Volt, "V", Unit_Volt, 1, 0 },
/* 20 */ { Unit_MilliVolt, "mV", Unit_Volt, -1000, 0 },
/* 21 */ { Unit_MicroVolt, "uV", Unit_Volt, -1000000, 0 },
/* 22 */ { Unit_Celsius, "C", Unit_MilliKelvin, 1000, 273150 },
/* 23 */ { Unit_DeciCelsius, "dC", Unit_Celsius, -10, 273150 },
/* 24 */ { Unit_CentiCelsius, "cC", Unit_Celsius, -100, 0},
/* 25 */ { Unit_MilliCelsius, "mC", Unit_Celsius, -1000, 0 },
/* 26 */ { Unit_MicroCelsius, "uC", Unit_Celsius, -1000000, 0},
/* 27 */ { Unit_Fahrenheit, "F", Unit_MilliKelvin, 555, 255116 },
/* 28 */ { Unit_Hertz, "Hz", Unit_Hertz, 1, 0},
/* 29 */ { Unit_KiloHertz, "kHz", Unit_Hertz, 1000, 0},
/* 30 */ { Unit_MegaHertz,"MHz", Unit_Hertz, 1000000, 0},
/* 31 */ { Unit_GigaHertz, "GHz", Unit_Hertz, 1000000000, 0},
};
#define ConversionTableSize ((int)(sizeof(conversionTable)/sizeof(ConversionTableEntry)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment