Skip to contentSkip to conversation

wpan-tools: convert tx power value

PATCH In review Varka Bhadram 1 participant 2 messages May 27, 2015 IEEE 802.15.4

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wpan-tools: convert tx power value

This patch convert the tx power value from long to float to support the IEEE-802.15.4 radio power setting values.

---
 src/phy.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/phy.c +2 -2
index ee0e7ad..285801c 100644
@@ -53,14 +53,14 @@ static int handle_tx_power_set(struct nl802154_state *state,
 			       int argc, char **argv,
 			       enum id_input id)
 {
-	long dbm;
+	float dbm;
 	char *end;
 
 	if (argc < 1)
 		return 1;
 
 	/* TX_POWER */
-	dbm = strtol(argv[0], &end, 10);
+	dbm = strtof(argv[0], &end);
 	if (*end != '\0')
 		return 1;
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 2 lines · Varka Bhadram

This patch convert the tx power value from long to float to support the IEEE-802.15.4 radio power setting values.

I think here i need to fix (wpan-tools to phy) the commit message to which this patch was targeting about.

I will do, and resend the patch.

Signature · 1 line
Varka Bhadram