Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1497847
boundary_check.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
boundary_check.cpp
View Options
#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
Details
Attached
Mime Type
text/x-c
Expires
Sun, Mar 1, 10:18 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
280924
Default Alt Text
boundary_check.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment