Skip to content

Commit c3af944

Browse files
authored
Fix various spelling issues (#400)
1 parent 12d8483 commit c3af944

File tree

10 files changed

+23
-23
lines changed

10 files changed

+23
-23
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ endif()
191191

192192
include (CTest)
193193

194-
## Simple test wether we can run the application (should basic hidapi functions, like enumerate, work)
194+
## Simple test whether we can run the application (should basic hidapi functions, like enumerate, work)
195195
enable_testing()
196196
add_test(run_test headsetcontrol)
197197
set_tests_properties(run_test PROPERTIES PASS_REGULAR_EXPRESSION "No supported device found;Found")

src/dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static void print_help()
106106
printf("HINTS\n");
107107
printf("\tsend and receive can be combined\n");
108108
printf("\t--send does not return anything on success and is always executed first\n");
109-
printf("\tDATA can be specified as single bytes, either as decimal or hex, seperated by spaces or commas or newlines\n");
109+
printf("\tDATA can be specified as single bytes, either as decimal or hex, separated by spaces or commas or newlines\n");
110110
printf("\n");
111111

112112
printf("EXAMPLEs\n");

src/device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ struct device {
257257
* @returns > 0 success
258258
* -1 HIDAPI error
259259
*/
260-
int (*notifcation_sound)(hid_device* hid_device, uint8_t soundid);
260+
int (*notification_sound)(hid_device* hid_device, uint8_t soundid);
261261

262262
/** @brief Function pointer for turning light on or off of the headset
263263
*

src/devices/corsair_void.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ void void_init(struct device** device)
6969
device_void.capability_details[CAP_NOTIFICATION_SOUND] = (struct capability_detail) { .usagepage = 0xffc5, .usageid = 0x1, .interface = 3 };
7070
device_void.capability_details[CAP_LIGHTS] = (struct capability_detail) { .usagepage = 0xffc5, .usageid = 0x1, .interface = 3 };
7171

72-
device_void.send_sidetone = &void_send_sidetone;
73-
device_void.request_battery = &void_request_battery;
74-
device_void.notifcation_sound = &void_notification_sound;
75-
device_void.switch_lights = &void_lights;
72+
device_void.send_sidetone = &void_send_sidetone;
73+
device_void.request_battery = &void_request_battery;
74+
device_void.notification_sound = &void_notification_sound;
75+
device_void.switch_lights = &void_lights;
7676

7777
*device = &device_void;
7878
}

src/devices/headsetcontrol_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void headsetcontrol_test_init(struct device** device)
8787

8888
device_headsetcontrol_test.send_sidetone = &headsetcontrol_test_send_sidetone;
8989
device_headsetcontrol_test.request_battery = &headsetcontrol_test_request_battery;
90-
device_headsetcontrol_test.notifcation_sound = &headsetcontrol_test_notification_sound;
90+
device_headsetcontrol_test.notification_sound = &headsetcontrol_test_notification_sound;
9191
device_headsetcontrol_test.switch_lights = &headsetcontrol_test_lights;
9292
device_headsetcontrol_test.send_inactive_time = &headsetcontrol_test_set_inactive_time;
9393
device_headsetcontrol_test.request_chatmix = &headsetcontrol_test_request_chatmix;

src/devices/hyperx_calphaw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static BatteryInfo calphaw_request_battery(hid_device* device_handle)
144144
uint8_t batteryPercentage = data_read[3];
145145

146146
#ifdef DEBUG
147-
uint32_t batteryVoltage = (data_read[4] << 8) | data_read[5]; // best assumtion this is voltage in mV
147+
uint32_t batteryVoltage = (data_read[4] << 8) | data_read[5]; // best assumption this is voltage in mV
148148
printf("batteryVoltage: %d mV\n", batteryVoltage);
149149
#endif
150150
info.status = BATTERY_AVAILABLE;

src/devices/steelseries_arctis_nova_5.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static uint8_t EQUALIZER_FILTER_MAP[NUM_EQ_FILTER_TYPES] = {
8181
};
8282

8383
static int nova_5_send_sidetone(hid_device* device_handle, uint8_t num);
84-
static int nova_5_send_microhpone_mute_led_brightness(hid_device* device_handle, uint8_t num);
84+
static int nova_5_send_microphone_mute_led_brightness(hid_device* device_handle, uint8_t num);
8585
static int nova_5_send_microphone_volume(hid_device* device_handle, uint8_t num);
8686
static int nova_5_send_inactive_time(hid_device* device_handle, uint8_t num);
8787
static int nova_5_send_volume_limiter(hid_device* device_handle, uint8_t num);
@@ -119,7 +119,7 @@ void arctis_nova_5_init(struct device** device)
119119
device_arctis.capability_details[CAP_EQUALIZER] = (struct capability_detail) { .usagepage = 0xffc0, .usageid = 0x1, .interface = 3 };
120120

121121
device_arctis.send_sidetone = &nova_5_send_sidetone;
122-
device_arctis.send_microphone_mute_led_brightness = &nova_5_send_microhpone_mute_led_brightness;
122+
device_arctis.send_microphone_mute_led_brightness = &nova_5_send_microphone_mute_led_brightness;
123123
device_arctis.send_microphone_volume = &nova_5_send_microphone_volume;
124124
device_arctis.request_battery = &nova_5_get_battery;
125125
device_arctis.request_chatmix = &nova_5_get_chatmix;
@@ -203,7 +203,7 @@ static int nova_5_send_microphone_volume(hid_device* device_handle, uint8_t num)
203203
return nova_5_save_state(device_handle);
204204
}
205205

206-
static int nova_5_send_microhpone_mute_led_brightness(hid_device* device_handle, uint8_t num)
206+
static int nova_5_send_microphone_mute_led_brightness(hid_device* device_handle, uint8_t num)
207207
{
208208
// Off = 0x00
209209
// low = 0x01
@@ -351,7 +351,7 @@ static int nova_5_send_equalizer(hid_device* device_handle, struct equalizer_set
351351
uint8_t data[MSG_SIZE] = { 0x0, 0x33 };
352352

353353
/**
354-
* constains the eq band frequencies used in "default" well known profiles used in presets
354+
* contains the eq band frequencies used in "default" well known profiles used in presets
355355
*/
356356
const unsigned char band_freq_le[2 * EQUALIZER_BANDS_COUNT] = {
357357
0x20,

src/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static void print_readmetable()
184184
/**
185185
* @brief Checks if an existing connection exists, and either uses it, or closes it and creates a new one
186186
*
187-
* A device - depending on the feature - needs differend Endpoints/Connections
187+
* A device - depending on the feature - needs different Endpoints/Connections
188188
* Instead of opening and keeping track of multiple connections, we close and open connections no demand
189189
*
190190
*
@@ -193,7 +193,7 @@ static void print_readmetable()
193193
* @param device_handle an existing device handle or NULL if none yet
194194
* @param device headsetcontrol struct, containing vendor and productid
195195
* @param cap which capability to use, to determine interfaceid and usageids
196-
* @return hid_device pointer if successfull, or NULL (error in hid_error)
196+
* @return hid_device pointer if successful, or NULL (error in hid_error)
197197
*/
198198
static hid_device* dynamic_connect(char** existing_hid_path, hid_device* device_handle,
199199
struct device* device, enum capabilities cap)
@@ -307,7 +307,7 @@ static FeatureResult handle_feature(struct device* device_found, hid_device** de
307307
}
308308

309309
case CAP_NOTIFICATION_SOUND:
310-
ret = device_found->notifcation_sound(*device_handle, (uint8_t) * (int*)param);
310+
ret = device_found->notification_sound(*device_handle, (uint8_t) * (int*)param);
311311
break;
312312

313313
case CAP_LIGHTS:
@@ -503,7 +503,7 @@ void print_help(char* programname, struct device* device_found, bool show_all)
503503
printf("Parametric Equalizer:\n");
504504
printf(" --parametric-equalizer STRING\t\tSet equalizer bands (bands separated by semicolon)\n");
505505
printf(" Band format:\t\t\tFREQUENCY,GAIN,Q_FACTOR,FILTER_TYPE\n");
506-
printf(" Availabe filter types:\t\t");
506+
printf(" Available filter types:\t\t");
507507
for (int i = 0; i < NUM_EQ_FILTER_TYPES; i++) {
508508
if (show_all || has_capability(device_found->parametric_equalizer->filter_types, i)) {
509509
printf("%s, ", equalizer_filter_type_str[i]);
@@ -1016,7 +1016,7 @@ int main(int argc, char* argv[])
10161016
bool isExtendedOutput = output_format == OUTPUT_YAML || output_format == OUTPUT_JSON || output_format == OUTPUT_ENV;
10171017
for (int i = 0; i < headset_available; i++) {
10181018
for (int j = 0; j < numFeatures; j++) {
1019-
// For specific output types, like YAML, we will do all actions - even when not specified - to aggreate all information
1019+
// For specific output types, like YAML, we will do all actions - even when not specified - to aggregate all information
10201020
if (isExtendedOutput && feature_requests[i][j].type == CAPABILITYTYPE_INFO && !feature_requests[i][j].should_process) {
10211021
if (device_has_capability(devices_found[i].device, feature_requests[i][j].cap)) {
10221022
feature_requests[i][j].should_process = true;

src/output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void output(DeviceList* deviceList, bool print_capabilities, OutputType output)
112112
infos = calloc(num_devices, sizeof(HeadsetInfo));
113113
}
114114

115-
// Supress static analysis warning
115+
// Suppress static analysis warning
116116
assert((infos != NULL && status.device_count > 0) || (infos == NULL && status.device_count == 0));
117117

118118
// Iterate through all devices

src/utility.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ int spline_battery_level(const int p[], const int v[], const size_t size, uint16
4747
/**
4848
* @brief This function calculates the estimate batttery level in percent.
4949
*
50-
* To find the terms representing the polynominal discarge curve of the
50+
* To find the terms representing the polynomial discharge curve of the
5151
* battery an solver like https://arachnoid.com/polysolve/ can be used.
5252
*
53-
* @param terms polynominal terms for the battery discharge curve
53+
* @param terms polynomial terms for the battery discharge curve
5454
* @param numterms number of terms
5555
* @param voltage readings
5656
* @return battery level in percent
@@ -99,8 +99,8 @@ struct parametric_equalizer_settings* parse_parametric_equalizer_settings(const
9999
*
100100
* @param input input string
101101
* @param id1 the first (left) id
102-
* @param id2 the secound it
103-
* @return int 0 if successfull, or 1 if not two ids provided
102+
* @param id2 the second it
103+
* @return int 0 if successful, or 1 if not two ids provided
104104
*/
105105
int get_two_ids(char* input, int* id1, int* id2);
106106

0 commit comments

Comments
 (0)