Index: drivers/powercom-hid.c
===================================================================
--- drivers/powercom-hid.c	(revisione 3857)
+++ drivers/powercom-hid.c	(copia locale)
@@ -82,7 +82,7 @@
 {
 	uint16_t	i = value;
 
-	snprintf(powercom_scratch_buf, sizeof(powercom_scratch_buf), "%d", 60 * (i & 0x00FF) + (i >> 8));
+	snprintf(powercom_scratch_buf, sizeof(powercom_scratch_buf), "%d", 60 * (i >> 8) + (i & 0x00FF));
 	upsdebugx(3, "%s: value = %.0f, buf = %s", __func__, value, powercom_scratch_buf);
 
 	return powercom_scratch_buf;
@@ -94,8 +94,8 @@
 	uint16_t	val, command;
 
 	val = atoi(value ? value : s);
-	command = ((val % 60) << 8) + (val / 60);
-	command |= 0x4000;	/* AC RESTART NORMAL ENABLE */
+	command = ((val / 60) << 8) + (val % 60);
+	command |= 0x0040;	/* AC RESTART NORMAL ENABLE */
 	upsdebugx(3, "%s: value = %s, command = %04X", __func__, value, command);
 
 	return command;
