Changeset 4716
- Timestamp:
- 08/26/07 22:35:26 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/chips.c
r4715 r4716 41 41 #define HYSTONLY 5 42 42 43 /* minmax = 0 for limit/hysteresis, 1 for max/min, 2 for max only; 44 curprec and limitprec are # of digits after decimal point 45 for the current temp and the limits 46 note: symbolic constants defined in chips.h */ 43 /* symbolic constants for minmax defined above */ 47 44 static void print_temp_info(float n_cur, float n_over, float n_hyst, 48 int minmax , int curprec, int limitprec)45 int minmax) 49 46 { 50 47 /* note: deg_ctof() will preserve HUGEVAL */ … … 55 52 } 56 53 57 /* use %* to pass precision as an argument */58 54 if (n_cur != HUGE_VAL) 59 printf("%+6. *f%s ", curprec, n_cur, degstr);55 printf("%+6.1f%s ", n_cur, degstr); 60 56 else 61 57 printf(" FAULT "); 62 58 63 59 if (minmax == MINMAX) 64 printf("(low = %+5. *f%s, high = %+5.*f%s) ",65 limitprec,n_hyst, degstr,66 limitprec,n_over, degstr);60 printf("(low = %+5.1f%s, high = %+5.1f%s) ", 61 n_hyst, degstr, 62 n_over, degstr); 67 63 else if (minmax == MAXONLY) 68 printf("(high = %+5. *f%s) ",69 limitprec,n_over, degstr);64 printf("(high = %+5.1f%s) ", 65 n_over, degstr); 70 66 else if (minmax == CRIT) 71 printf("(high = %+5. *f%s, crit = %+5.*f%s) ",72 limitprec,n_over, degstr,73 limitprec,n_hyst, degstr);67 printf("(high = %+5.1f%s, crit = %+5.1f%s) ", 68 n_over, degstr, 69 n_hyst, degstr); 74 70 else if (minmax == HYST) 75 printf("(high = %+5. *f%s, hyst = %+5.*f%s) ",76 limitprec,n_over, degstr,77 limitprec,n_hyst, degstr);71 printf("(high = %+5.1f%s, hyst = %+5.1f%s) ", 72 n_over, degstr, 73 n_hyst, degstr); 78 74 else if (minmax == HYSTONLY) 79 printf("(hyst = %+5. *f%s) ",80 limitprec,n_over, degstr);75 printf("(hyst = %+5.1f%s) ", 76 n_over, degstr); 81 77 else if (minmax != SINGLE) 82 78 printf("Unknown temperature mode!"); … … 242 238 free(label); 243 239 244 print_temp_info(val, max, min, type , 1, 1);240 print_temp_info(val, max, min, type); 245 241 246 242 /* ALARM features */
