adjust default volume
This commit is contained in:
+42
-12
@@ -18,7 +18,7 @@ namespace {
|
|||||||
|
|
||||||
static constexpr uint8_t state_init_data[63] = {
|
static constexpr uint8_t state_init_data[63] = {
|
||||||
0xfd, 0xf7, 0x0, 0x0,
|
0xfd, 0xf7, 0x0, 0x0,
|
||||||
0x7f, 0x7f, // Headphones, Speaker
|
0x7f, 0x64, // Headphones, Speaker
|
||||||
0xff, 0x9, 0x0, 0x0F, 0x0, 0x0, 0x0, 0x0,
|
0xff, 0x9, 0x0, 0x0F, 0x0, 0x0, 0x0, 0x0,
|
||||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||||
@@ -58,7 +58,7 @@ void state_update(const uint8_t *data, const uint8_t size) {
|
|||||||
memcpy(state + offset, data + offset, length);
|
memcpy(state + offset, data + offset, length);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
auto set_bit = [](uint8_t& byte, int bit, bool value) {
|
auto set_bit = [](uint8_t &byte, const int bit, const bool value) {
|
||||||
byte = (byte & ~(1 << bit)) | (value << bit);
|
byte = (byte & ~(1 << bit)) | (value << bit);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,12 +70,26 @@ void state_update(const uint8_t *data, const uint8_t size) {
|
|||||||
2
|
2
|
||||||
);
|
);
|
||||||
|
|
||||||
// copy_if_allowed(update.AllowHeadphoneVolume, offsetof(SetStateData, VolumeHeadphones),
|
/*copy_if_allowed(
|
||||||
// sizeof(update.VolumeHeadphones));
|
update.AllowHeadphoneVolume,
|
||||||
// copy_if_allowed(update.AllowSpeakerVolume, offsetof(SetStateData, VolumeSpeaker),
|
offsetof(SetStateData, VolumeHeadphones),
|
||||||
// sizeof(update.VolumeSpeaker));
|
sizeof(update.VolumeHeadphones)
|
||||||
// copy_if_allowed(update.AllowMicVolume, offsetof(SetStateData, VolumeMic), sizeof(update.VolumeMic));
|
);*/
|
||||||
// copy_if_allowed(update.AllowAudioControl, kAudioControlOffset, sizeof(uint8_t));
|
/*copy_if_allowed(
|
||||||
|
update.AllowSpeakerVolume,
|
||||||
|
offsetof(SetStateData, VolumeSpeaker),
|
||||||
|
sizeof(update.VolumeSpeaker)
|
||||||
|
);*/
|
||||||
|
/*copy_if_allowed(
|
||||||
|
update.AllowMicVolume,
|
||||||
|
offsetof(SetStateData, VolumeMic),
|
||||||
|
sizeof(update.VolumeMic)
|
||||||
|
);*/
|
||||||
|
/*copy_if_allowed(
|
||||||
|
update.AllowAudioControl,
|
||||||
|
kAudioControlOffset,
|
||||||
|
sizeof(uint8_t)
|
||||||
|
);*/
|
||||||
|
|
||||||
copy_if_allowed(
|
copy_if_allowed(
|
||||||
update.AllowMuteLight,
|
update.AllowMuteLight,
|
||||||
@@ -83,7 +97,11 @@ void state_update(const uint8_t *data, const uint8_t size) {
|
|||||||
sizeof(update.MuteLightMode)
|
sizeof(update.MuteLightMode)
|
||||||
);
|
);
|
||||||
|
|
||||||
// copy_if_allowed(update.AllowAudioMute, kMuteControlOffset, sizeof(uint8_t));
|
/*copy_if_allowed(
|
||||||
|
update.AllowAudioMute,
|
||||||
|
kMuteControlOffset,
|
||||||
|
sizeof(uint8_t)
|
||||||
|
);*/
|
||||||
|
|
||||||
copy_if_allowed(
|
copy_if_allowed(
|
||||||
update.AllowRightTriggerFFB,
|
update.AllowRightTriggerFFB,
|
||||||
@@ -96,9 +114,21 @@ void state_update(const uint8_t *data, const uint8_t size) {
|
|||||||
sizeof(update.LeftTriggerFFB)
|
sizeof(update.LeftTriggerFFB)
|
||||||
);
|
);
|
||||||
|
|
||||||
// copy_if_allowed(update.AllowMotorPowerLevel, kMotorPowerLevelOffset, sizeof(uint8_t));
|
/*copy_if_allowed(
|
||||||
// copy_if_allowed(update.AllowAudioControl2, kAudioControl2Offset, sizeof(uint8_t));
|
update.AllowMotorPowerLevel,
|
||||||
// copy_if_allowed(update.AllowHapticLowPassFilter, kHapticLowPassFilterOffset, sizeof(uint8_t));
|
kMotorPowerLevelOffset,
|
||||||
|
sizeof(uint8_t)
|
||||||
|
);*/
|
||||||
|
/*copy_if_allowed(
|
||||||
|
update.AllowAudioControl2,
|
||||||
|
kAudioControl2Offset,
|
||||||
|
sizeof(uint8_t)
|
||||||
|
);*/
|
||||||
|
/*copy_if_allowed(
|
||||||
|
update.AllowHapticLowPassFilter,
|
||||||
|
kHapticLowPassFilterOffset,
|
||||||
|
sizeof(uint8_t)
|
||||||
|
);*/
|
||||||
|
|
||||||
copy_if_allowed(
|
copy_if_allowed(
|
||||||
update.AllowColorLightFadeAnimation,
|
update.AllowColorLightFadeAnimation,
|
||||||
|
|||||||
Reference in New Issue
Block a user