Subversion Repositories SmartDukaan

Rev

Rev 2454 | Rev 2571 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2454 Rev 2556
Line 10... Line 10...
10
    threeg_standbytime_score = 0.0
10
    threeg_standbytime_score = 0.0
11
    usage_time_score = 0.0
11
    usage_time_score = 0.0
12
    
12
    
13
    if struct.has_key("features") :
13
    if struct.has_key("features") :
14
        features = struct.get("features")
14
        features = struct.get("features")
15
        # REVISIT - Nokia power adaptor should get more points
-
 
16
        # Power Adaptor
-
 
17
    
15
        
18
        # REVISIT - Certain battery types need to be than others
-
 
19
        # Battery Type
-
 
20
        battery_capacity = 0.0
16
        battery_capacity = 0.0
21
        last = "0"
17
        last = "0"
22
        battery_type = features.get("Battery type")
18
        battery_type = features.get("Battery type")
23
        battery_type = battery_type[0]
19
        battery_type = battery_type[0]
24
        battery_type = battery_type.split(" ")
20
        battery_type = battery_type.split(" ")
Line 49... Line 45...
49
            usage_time = float(usage_time[0])
45
            usage_time = float(usage_time[0])
50
            if usage_time > 10 :
46
            if usage_time > 10 :
51
                usage_time_score = 10
47
                usage_time_score = 10
52
            else:
48
            else:
53
                usage_time_score = usage_time
49
                usage_time_score = usage_time
54
                
50
                 
55
    # Max will be 1.5 * 7 = ceil(10.5) = 10 
-
 
56
    if struct.has_key("childrenslides") :
51
    if struct.has_key("childrenslides") :
57
        childrenslides = struct.get("childrenslides")
52
        childrenslides = struct.get("childrenslides")
58
        
53
        
59
        if childrenslides.has_key("Capacity") :
54
        if childrenslides.has_key("Capacity") :
60
            capacity = childrenslides.get("Capacity")
55
            capacity = childrenslides.get("Capacity")