Commit 28800845 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/libwr: fix the interpretation of DOM raw data

Based on
Paragraph 9.2 item 4 and 5.
Signed-off-by: Adam Wujek's avatarAdam Wujek <>
parent 10bef13d
......@@ -325,9 +325,9 @@ void shw_sfp_print_dom(struct shw_sfp_dom * dom)
printf("Temperature: %.3f C\n", (int8_t)dom->temp[0] + dom->temp[1]/(float)256);
printf("Voltage: %.3f V\n", (dom->vcc[0]*256 + dom->vcc[1])/(float)10000);
printf("Bias Current: %.3f uA\n", (dom->tx_bias[0]*256+dom->tx_bias[1])/(float)500000);
printf("TX power: %.3f mW\n", (dom->tx_pow[0]*256 + dom->tx_pow[1])/(float)100000);
printf("RX power: %.3f mW\n", (dom->rx_pow[0]*256 + dom->rx_pow[1])/(float)100000);
printf("Bias Current: %.3f mA\n", (dom->tx_bias[0]*256+dom->tx_bias[1])/(float)500);
printf("TX power: %.3f mW\n", (dom->tx_pow[0]*256 + dom->tx_pow[1])/(float)10000);
printf("RX power: %.3f mW\n", (dom->rx_pow[0]*256 + dom->rx_pow[1])/(float)10000);
void shw_sfp_header_dump(struct shw_sfp_header *head)
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