Changeset 100 for openweather


Ignore:
Timestamp:
21/01/07 06:35:36 (5 years ago)
Author:
nigel
Message:

added total rain

Location:
openweather
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • openweather/openweather.install

    r96 r100  
    1717  `wind_chill` decimal(3,1) NOT NULL default '0.0', 
    1818  `rain_1h` decimal(3,1) NOT NULL default '0.0', 
     19  `rain_total` DECIMAL( 5, 1 ) NOT NULL , 
    1920  `rel_pressure` decimal(5,1) NOT NULL default '0.0', 
    2021  `tendency` varchar(7) NOT NULL default '', 
  • openweather/openweather.module

    r99 r100  
    341341    // Check person owns or can write to entry 
    342342 
    343     return db_query("INSERT INTO {openweather_readings} (nid, `timestamp`, temp_out, rel_hum_out, windspeed, wind_angle, wind_chill, rain_1h, rel_pressure, dewpoint) VALUES (%d, '%s', %s, %s, %s, %s, %s, %s, %s, %s)", $nid, $data['timestamp'], $data['temp'], $data['rel_hum'], $data['windspeed'], $data['wind_angle'], $data['wind_chill'], $data['rain_1h'], $data['rel_pressure'], $data['dewpoint']); 
     343    return db_query("INSERT INTO {openweather_readings} (nid, `timestamp`, temp_out, rel_hum_out, windspeed, wind_angle, wind_chill, rain_1h, rel_pressure, dewpoint, rain_total) VALUES (%d, '%s', %s, %s, %s, %s, %s, %s, %s, %s, %s)", $nid, $data['timestamp'], $data['temp'], $data['rel_hum'], $data['windspeed'], $data['wind_angle'], $data['wind_chill'], $data['rain_1h'], $data['rel_pressure'], $data['dewpoint'], $data['rain_total']); 
    344344  } else { 
    345345    return false; 
     
    395395    break; 
    396396 
     397  case 'rain_total': 
     398    $title = t("Rainfall total"); 
     399    $autoScale = false; 
     400    $units = 'mm'; 
     401    $decimals = 1; 
     402    break; 
     403 
    397404  default: 
    398405    return; 
Note: See TracChangeset for help on using the changeset viewer.