Skip to content

Commit 30c4e85

Browse files
authored
Merge pull request #281 from DevKor-github/bugfix
ble 사람 로직 수정
2 parents b499e84 + b3244be commit 30c4e85

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/devkor/com/teamcback/domain/ble/service/BLEService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ private int getBlEPeople(int lastCount, BLEDevice bleDevice) {
7373

7474
//count, ratio, defaultcount로 예측 인원 계산(int)
7575
private int calculate_people(int count, double ratio, double defaultCount) {
76-
return (int) Math.round(count * ratio + defaultCount);
76+
int people = (int) Math.round(count * ratio + defaultCount);
77+
if (people < 0) people = 0;
78+
return people;
7779
}
7880

7981
@Transactional(readOnly = true)

0 commit comments

Comments
 (0)