Conversation
|
Will review once #480 is merged. |
Conflicts: addons/sys_rack/fnc_addRack.sqf addons/sys_rack/fnc_initVehicle.sqf addons/sys_rack/fnc_initializeRack.sqf addons/sys_rack/stringtable.xml
|
@ColinM9991 That it has been merged, it does not mean that it is going to be reviewed immediately. Note that this PR is labelled for 2.7 and 2.6 is not out yet. |
|
Have an issue where once a radio speaker is turned on in a vehicle, it cannot be turned off, and any attempts to resolve it seem to bug the radio out, making it unusable |
|
Ah, fixed internally. I never really pushed it. |
Conflicts: addons/api/fnc_addRackToVehicle.sqf addons/sys_prc77/radio/fnc_initializeRadio.sqf addons/sys_rack/CfgAcreRacks.hpp addons/sys_rack/CfgVehicles.hpp addons/sys_rack/vrc64/__PREP__.sqf addons/sys_rack/vrc64/fnc_vrc64MountRadio.sqf addons/sys_rack/vrc64/fnc_vrc64MountableRadio.sqf addons/sys_rack/vrc64/fnc_vrc64UnmountRadio.sqf
| // Loudspeakers | ||
| if (_radio in ACRE_ACCESSIBLE_RACK_RADIOS) then { | ||
| if ([_radio, "isExternalAudio"] call EFUNC(sys_data,dataEvent)) then { | ||
| _action = ["acre_loudspeaker", localize ELSTRING(sys_rack,turnOffSpeaker), "", {[((_this select 2) select 0), false] call EFUNC(sys_rack,activateRackSpeaker)}, {true}, {}, _params] call ace_interact_menu_fnc_createAction; |
| private _obj = [_radioId] call EFUNC(sys_radio,getRadioObject); | ||
| private _pos = getPosASL _obj; | ||
|
|
||
| private _rackId = [_radioId] call EFUNC(sys_rack,getRackFromRadio); |
There was a problem hiding this comment.
This is all same for all radios, with just 2 cases based on handheld or rack radio. An outside function with arguments for that would probably be a good idea.
| false; | ||
| params ["_radioId", "_event", "_eventData", "_radioData"]; | ||
|
|
||
| (HASH_GET(_radioData, "audioPath") == "RACKSPEAKER") |
| #include "script_component.hpp" | ||
| /* | ||
| * Author: ACRE2Team | ||
| * Sets the mounted radio external audio to ON/OFF. |
There was a problem hiding this comment.
* Toggles the mounted radio external audio.
Maybe rename the function accordingly as well.
|
|
||
| params ["_radioId", "_active", ["_rackId",""]]; | ||
|
|
||
| // TODO: For version 2.7. Implement check if rack has an external speaker |
| <French>Arrêter de tout utiliser</French> | ||
| </Key> | ||
| <Key ID="STR_ACRE_sys_rack_turnOnSpeaker"> | ||
| <English>Turn On Speaker</English> |
There was a problem hiding this comment.
Does maybe Speaker On and Speaker Off fit better with the rest of action naming? (I am not sure.)
| HASH_SET(_radioData,"radioOn", 1); | ||
| HASH_SET(_radioData,"pressedButton", -1); | ||
| HASH_SET(_radioData,"powerSource", "BAT"); | ||
| HASH_SET(_radioData,"powerSource","BAT"); |
There was a problem hiding this comment.
Our macro definition has spaces #define HASH_SET(hash, key, val)
To be consistent, I suggest:
| HASH_SET(_radioData,"powerSource","BAT"); | |
| HASH_SET(_radioData," volume", 1); | |
| HASH_SET(_radioData," currentChannel", 0); | |
| HASH_SET(_radioData," radioOn", 1); | |
| HASH_SET(_radioData," pressedButton", -1); | |
| HASH_SET(_radioData," powerSource", "BAT"); | |
| HASH_SET(_radioData," pgm_pa_mode", "ON"); | |
| HASH_SET(_radioData," audioPath", "HEADSET"); |
| HASH_SET(_radioData,"currentChannel",0); | ||
| HASH_SET(_radioData,"radioOn",1); | ||
| HASH_SET(_radioData,"audioPath", "TOPAUDIO"); | ||
| HASH_SET(_radioData,"audioPath","TOPAUDIO"); |
There was a problem hiding this comment.
Same as above:
| HASH_SET(_radioData,"audioPath","TOPAUDIO"); | |
| HASH_SET(_radioData, "volume", 1); | |
| HASH_SET(_radioData, "currentChannel", 0); | |
| HASH_SET(_radioData, "radioOn", 1); | |
| HASH_SET(_radioData, "audioPath", "TOPAUDIO"); | |
| HASH_SET(_radioData, "powerSource", "BAT"); |
| HASH_SET(_radioData,"CTCSSTx", 150); | ||
| HASH_SET(_radioData,"CTCSSRx", 150); | ||
| HASH_SET(_radioData,"CTCSSTx",150); | ||
| HASH_SET(_radioData,"CTCSSRx",150); |
| HASH_SET(_rackData,"mountedRadio",_mountedRadio); | ||
| HASH_SET(_rackData,"isRadioRemovable",_isRadioRemovable); | ||
| HASH_SET(_rackData,"wiredIntercoms",_intercoms); | ||
| HASH_SET(_rackData,"rackPosition",_rackPosition); |
There was a problem hiding this comment.
Same as above:
| HASH_SET(_rackData,"rackPosition",_rackPosition); | |
| HASH_SET(_rackData, "name", _displayName); | |
| HASH_SET(_rackData, "shortName", _shortName); | |
| HASH_SET(_rackData, "allowed", _allowed); | |
| HASH_SET(_rackData, "disabled", _disabled); | |
| HASH_SET(_rackData, "mountedRadio", _mountedRadio); | |
| HASH_SET(_rackData, "isRadioRemovable", _isRadioRemovable); | |
| HASH_SET(_rackData, "wiredIntercoms", _intercoms); | |
| HASH_SET(_rackData, "rackPosition", _rackPosition); | |
| HASH_SET(_rackData, "vehicle", _vehicle); |
| HASH_SET(_radioData,"programmingStep", 0); | ||
| HASH_SET(_radioData,"lastActiveChannel",0); | ||
| HASH_SET(_radioData,"audioPath", "HEADSET"); | ||
| HASH_SET(_radioData,"audioPath","HEADSET"); |
There was a problem hiding this comment.
| HASH_SET(_radioData,"audioPath","HEADSET"); | |
| HASH_SET(_radioData, "volume", 1); | |
| HASH_SET(_radioData, "radioOn", 1); | |
| HASH_SET(_radioData, "currentChannel", 0); | |
| HASH_SET(_radioData, "channelKnobPosition", 2); // Channel 1 (after on/off options) | |
| HASH_SET(_radioData, "volumeKnobPosition", 0);// mid-way | |
| HASH_SET(_radioData, "programmingStep", 0); | |
| HASH_SET(_radioData, "lastActiveChannel", 0); | |
| HASH_SET(_radioData, "audioPath", "HEADSET"); |
| //HASH_SET(_radioData,"lastActiveChannel",GVAR(manualChannel)); | ||
| HASH_SET(_radioData,"audioPath", "HEADSET"); | ||
| HASH_SET(_radioData,"powerSource", "BAT"); | ||
| HASH_SET(_radioData,"audioPath","HEADSET"); |
There was a problem hiding this comment.
| HASH_SET(_radioData,"audioPath","HEADSET"); | |
| // General | |
| HASH_SET(_radioData, "radioOn", 1); | |
| HASH_SET(_radioData, "volume", 1); | |
| HASH_SET(_radioData, "currentChannel", GVAR(manualChannel)); // Manual Channel | |
| HASH_SET(_radioData, "audioPath", "HEADSET"); | |
| HASH_SET(_radioData, "powerSource", "BAT"); | |
| // Channel | |
| HASH_SET(_radioData, "manualChannelSelection", 1); // Manual Frequency Selection Flag | |
| HASH_SET(_radioData, "power", 4000); | |
| HASH_SET(_radioData, "channelSpacing", 0); // 0: 25kHz, 1: 50kHz | |
| HASH_SET(_radioData, "CTCSS", 0); | |
| HASH_SET(_radioData, "modulation", "FM"); | |
| HASH_SET(_radioData, "encryption", 0); | |
| HASH_SET(_radioData, "squelch", 0); | |
| // Knobs | |
| HASH_SET(_radioData, "mainKnobPosition", 2); // High Power Setting | |
| HASH_SET(_radioData, "functionKnobPosition", 2); // Manual Frequency Selection (no Relais) | |
| HASH_SET(_radioData, "volumeKnobPosition", 5); | |
| HASH_SET(_radioData, "channelSpacingKnobPosition", 1); // 0-3 | |
| HASH_SET(_radioData, "kHzKnobPosition", 0); | |
| HASH_SET(_radioData, "MHzKnobPosition", 0); | |
| HASH_SET(_radioData, "MemorySlotKnobPosition", 0); | |
| HASH_SET(_radioData, "NetworkKnobPosition", [ARR_3(1,2,3)]); |
|
Greetings, TheMagnetar are you still working on this? |
|
Yes. But other systems need to be in place before |
|
Any progress on this? Is there any work that needs to be done on this that I can help contribute to in terms of code? This is a huge feature request of mine and I'd love to see it in ACRE2! |
|
Negative, currently we are not working on this. Anyone is welcome to finish it however, it needs the addressed reviews and bringing it up-to-date with current codebase, as a starter. |
When merged this pull request will: