Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HR and BP enhancement #2268

Merged
merged 6 commits into from
Aug 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/medical/functions/fnc_actionCheckBloodPressure.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

#include "script_component.hpp"

private ["_caller","_target"];
private ["_caller","_target","_selectionName"];
_caller = _this select 0;
_target = _this select 1;
[[_caller, _target], QUOTE(DFUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
_selectionName = _this select 2;
[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@

#include "script_component.hpp"

private ["_caller","_target","_bloodPressure","_bloodPressureHigh","_bloodPressureLow", "_logOutPut", "_output"];
private ["_caller","_target","_selectionName","_bloodPressure","_bloodPressureHigh","_bloodPressureLow", "_logOutPut", "_output"];
_caller = _this select 0;
_target = _this select 1;
_selectionName = _this select 2;

_bloodPressure = [_target] call FUNC(getBloodPressure);
if (!alive _target) then {
Expand Down Expand Up @@ -54,6 +55,11 @@ if ([_caller] call FUNC(isMedic)) then {
};
};

if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(hasTourniquetAppliedTo)}) then {
_output = LSTRING(Check_Bloodpressure_Output_6);
_logOutPut = "";
};

["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent);

if (_logOutPut != "") then {
Expand Down
5 changes: 3 additions & 2 deletions addons/medical/functions/fnc_actionCheckPulse.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

#include "script_component.hpp"

private ["_caller","_target"];
private ["_caller","_target","_selectionName"];
_caller = _this select 0;
_target = _this select 1;
[[_caller, _target], QUOTE(DFUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
_selectionName = _this select 2;
[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
9 changes: 7 additions & 2 deletions addons/medical/functions/fnc_actionCheckPulseLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

#include "script_component.hpp"

private ["_caller", "_unit", "_heartRateOutput", "_heartRate", "_logOutPut"];
private ["_caller", "_unit", "_selectionName", "_heartRateOutput", "_heartRate", "_logOutPut"];
_caller = _this select 0;
_unit = _this select 1;

_selectionName = _this select 2;

_heartRate = _unit getvariable [QGVAR(heartRate), 80];
if (!alive _unit) then {
Expand Down Expand Up @@ -46,6 +46,11 @@ if (_heartRate > 1.0) then {
};
};

if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(hasTourniquetAppliedTo)}) then {
_heartRateOutput = LSTRING(Check_Pulse_Output_5);
_logOutPut = LSTRING(Check_Pulse_None);
};

["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent);

if (_logOutPut != "") then {
Expand Down