Page MenuHomePhorge

boundary_check.cpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

boundary_check.cpp

#include "boundary_check.h"
bool is_it_higher_than_learned_boundary(Sensor* sensor, int score, int boundary) {
return (sensor->get_sensorValue() > sensor->get_learned_threshold(score, boundary));
}
bool is_it_higher_than_hardcoded_boundary(Sensor* sensor, int score, int boundary) {
return (sensor->get_sensorValue() > sensor->get_hardcoded_threshold(score, boundary));
}
bool is_it_lower_than_learned_boundary(Sensor* sensor, int score, int boundary) {
return (sensor->get_sensorValue() < sensor->get_learned_threshold(score, boundary));
}
bool is_it_lower_than_hardcoded_boundary(Sensor* sensor, int score, int boundary) {
return (sensor->get_sensorValue() < sensor->get_hardcoded_threshold(score, boundary));
}
bool is_it_higher_than_boundary(Sensor* sensor, int score, int boundary) {
if(sensor->get_flag_learned_boundary_exist(score, boundary)) {
return is_it_higher_than_learned_boundary(sensor, score, boundary);
}
else {
return is_it_higher_than_hardcoded_boundary(sensor, score, boundary);
}
}
bool is_it_lower_than_boundary(Sensor* sensor, int score, int boundary) {
if(sensor->get_flag_learned_boundary_exist(score, boundary)) {
return is_it_lower_than_learned_boundary(sensor, score, boundary);
}
else {
return is_it_lower_than_hardcoded_boundary(sensor, score, boundary);
}
}

File Metadata

Mime Type
text/x-c
Expires
Sun, Mar 1, 6:29 PM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
280924
Default Alt Text
boundary_check.cpp (1 KB)

Event Timeline