Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
neilenns committed Apr 29, 2024
1 parent c8e6c5e commit 49c57fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/app/helpers/CallsignHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export const getCleanCallsign = (callsign: string): string => {
};

/**
* Takes a callsign like ZOA-ZSE, SEA_GND, or SEA_W_TWR and returns the three separate parts:
* Station: SEA (or original callsign if no parts found)
* Takes a callsign like ZOA-ZSE, SEA_GND, or LFPG_N_TWR and returns the three separate parts:
* Station: LFPG (or original callsign if no parts found)
* Position: TWR (or empty string if no position found)
* Subposition: W (or empty string if no sub-position found)
* Subposition: N (or empty string if no sub-position found)
* @param callsign The callsign to split apart
* @returns An array of the three parts: [station, position, subPosition]
*/
Expand All @@ -29,6 +29,6 @@ export const getCallsignParts = (
return [parts[0], "", parts[1]];
}

// Handles cases like "SEA_W_TWR"
// Handles cases like "LFPG_N_TWR"
return [parts[0], parts[2], parts[1]];
};
4 changes: 2 additions & 2 deletions src/app/helpers/RadioHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { RadioType } from "../store/radioStore";
/**
* Compares two radios to determine sort order. The currently connected station
* will always sort to the front of the list. The remaining stations will sort
* by station name (e.g. "SEA"), then by position (e.g. "TWR"), then by
* sub-position (e.g. "E")
* by station name (e.g. "LFPG"), then by position (e.g. "TWR"), then by
* sub-position (e.g. "N")
* @param a The first radio to compare
* @param b The second radio to compare
* @param connectedStationCallsign The callsign for the connected station
Expand Down

0 comments on commit 49c57fd

Please sign in to comment.