search for: fromhex

Displaying 2 results from an estimated 2 matches for "fromhex".

2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...ttery.runtime.low", ST_FLAG_STRING | ST_FLAG_RW); dstate_setaux("battery.runtime.low", 3); upsh.instcmd = instcmd; upsh.setvar = upsdrv_setvar; dstate_addcmd("shutdown.return"); dstate_addcmd("load.off"); } /* convert hex digit to int */ static inline int fromhex (char c) { return (c >= '0' && c <= '9') ? c - '0' : (c >= 'A' && c <= 'F') ? c - 'A' + 10 : (c >= 'a' && c <= 'f') ? c - 'a' + 10 : 0; } /* do checksumming on UPS response */ s...
2004 Dec 01
3
Hexidecimal conversion
Help I can produce the hexidecimal equivalent of a decimal number but I am having a hard time reversing the operation. I'm good for hex representations to 159 and am close to extending to 2559. The archives are not clear on the existence of a function for this task. Is there one? Here is what I have got so far: #Good for hex values to "9F" as.decmode<-function(as.character(x)){