Skip to content

Commit

Permalink
[knx] Fix typos in code comments (openhab#15839)
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Friedrich <[email protected]>
  • Loading branch information
holgerfriedrich authored Nov 3, 2023
1 parent fddacb4 commit 1ca0f64
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ private Map<String, String> readDeviceProperties(IndividualAddress address) thro

/**
* @implNote {@link readDeviceDescription(address)} tries to read device description from the KNX device.
* According to KNX specification, eihter device descriptor DD0 or DD2 must be implemented.
* According to KNX specification, either device descriptor DD0 or DD2 must be implemented.
* Currently only data from DD0 is returned; DD2 is just logged in debug mode.
*
* @param address Individual address of KNX device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public interface KNXClient {
/**
* Get the {@link DeviceInfoClient} which allows further device inspection.
*
* @return the device infor client
* @return the device info client
* @throws IllegalStateException in case the client is not connected
*/
DeviceInfoClient getDeviceInfoClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public SerialClient(int autoReconnectPeriod, ThingUID thingUID, int responseTime
}

/**
* try autodetection of cEMI devices via the PEI identification frame
* try automatic detection of cEMI devices via the PEI identification frame
*
* @implNote This is based on an vendor specific extension and may not work for other devices.
*/
Expand Down Expand Up @@ -92,7 +92,7 @@ protected boolean detectCemi() throws InterruptedException {
// content[1..2] physical address
// content[3..8] serial no
//
// Weinzierl adds 2 extra bytes, 0x0004 for capablity cEMI,
// Weinzierl adds 2 extra bytes, 0x0004 for capability cEMI,
// see "Weinzierl KNX BAOS Starter Kit, User Guide"
if (0 == content[9] && 4 == content[10]) {
logger.debug("Detected device with cEMI support");
Expand All @@ -118,7 +118,7 @@ protected KNXNetworkLink establishConnection() throws KNXException, InterruptedE
}
logger.debug("Establishing connection to KNX bus through FT1.2 on serial port {}{}{}", serialPort,
(useCemiL ? " using cEMI" : ""), ((useCemiL != useCemi) ? " (autodetected)" : ""));
// CEMI support by Calimero library, userful for newer serial devices like KNX RF sticks, kBerry,
// CEMI support by Calimero library, useful for newer serial devices like KNX RF sticks, kBerry,
// etc.; default is still old EMI frame format
if (useCemiL) {
return KNXNetworkLinkFT12.newCemiLink(serialPort, new TPSettings());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public IPBridgeThingHandler(Bridge bridge, @Nullable NetworkAddressService netwo

@Override
public void initialize() {
// initialisation would take too long and show a warning during binding startup
// initialization would take too long and show a warning during binding startup
// KNX secure is adding serious delay
updateStatus(ThingStatus.UNKNOWN);
initJob = scheduler.submit(this::initializeLater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private KNXTranslationProvider() {
*
* @param text text to be translated, may contain placeholders \{n\} for the n-th optional argument of this function
* @param arguments any optional arguments, will be inserted
* @return translated text with subsitutions if translationprovide is set and provides a translation, otherwise
* @return translated text with substitutions if translationProvider is set and provides a translation, otherwise
* returns original text with substitutions
*/
public String get(final String text, @Nullable Object @Nullable... arguments) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class KNXTranslationProviderTest {

@Test
void testGetBeforeInit() {
// initial state, should not crash and preferrably return original strings (w. pattern substitution)
// initial state, should not crash and preferably return original strings (w. pattern substitution)
assertEquals(UNKNOWN, KNXTranslationProvider.I18N.get(UNKNOWN));
assertEquals(UNKNOWN, KNXTranslationProvider.I18N.get(UNKNOWN, 5));
assertEquals(UNKNOWN_NULL, KNXTranslationProvider.I18N.get(UNKNOWN_PATTERN, null, null));
Expand Down

0 comments on commit 1ca0f64

Please sign in to comment.