|
1 | 1 | /* |
2 | 2 | Calimero GUI - A graphical user interface for the Calimero 3 tools |
3 | | - Copyright (c) 2006, 2024 B. Malinowsky |
| 3 | + Copyright (c) 2006, 2025 B. Malinowsky |
4 | 4 |
|
5 | 5 | This program is free software; you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
@@ -266,8 +266,8 @@ public void widgetSelected(final org.eclipse.swt.events.SelectionEvent e) |
266 | 266 | dpt.add(""); |
267 | 267 | final Map<Integer, MainType> allMainTypes = TranslatorTypes.getAllMainTypes(); |
268 | 268 | allMainTypes.forEach((i, main) -> { |
269 | | - dpt.add(main.getDescription()); |
270 | | - dpt.setData(main.getDescription(), new Object[] { main, null }); |
| 269 | + dpt.add(main.description()); |
| 270 | + dpt.setData(main.description(), new Object[] { main, null }); |
271 | 271 | try { |
272 | 272 | new TreeMap<>(main.getSubTypes()).forEach((id, sub) -> { |
273 | 273 | final boolean noUnit = sub.getUnit().isEmpty(); |
@@ -494,8 +494,8 @@ private Datapoint fetchDatapoint(final GroupAddress main, final Object[] dptData |
494 | 494 | final int current = dp.getMainNumber(); |
495 | 495 | final MainType mt = (MainType) dptData[0]; |
496 | 496 | final DPT dpt = (DPT) dptData[1]; |
497 | | - if (mt.getMainNumber() != current || (dpt != null && !dpt.getID().equals(dp.getDPT()))) |
498 | | - dp.setDPT(mt.getMainNumber(), |
| 497 | + if (mt.mainNumber() != current || (dpt != null && !dpt.getID().equals(dp.getDPT()))) |
| 498 | + dp.setDPT(mt.mainNumber(), |
499 | 499 | dpt != null ? dpt.getID() : mt.getSubTypes().entrySet().iterator().next().getValue().getID()); |
500 | 500 | } |
501 | 501 | return model.get(main); |
|
0 commit comments