Displaying 1 result from an estimated 1 matches for "watts_to_av_conversion".
2007 Aug 11
1
apc-hid.c: watts_to_av_conversion
Peter,
Looking through the usbhid-ups subdrivers, I came across the following
function in apc-hid.c, presumably added by you about two years ago (if
not, my apologies):
41 /* returns statically allocated string - must not use it again before
42 done with result! */
43 static char *watts_to_av_conversion_fun(long value) {
44 static char buf[20];
45
46 snprintf(buf, sizeof(buf), "%.0f", value * 1.4142136);
47 return buf;
48 }
49
50 static info_lkp_t watts_to_av_conversion[] = {
51 { 0, NULL, watts_to_av_conversion_fun }
52 };
Being a power electronic...