mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
extra option
This commit is contained in:
parent
da35c41524
commit
bcc428408a
@ -43,15 +43,17 @@ public class UiLoggerController implements Initializable {
|
||||
public CheckMenuItem chkHideOnDisconnect;
|
||||
public CheckMenuItem chkResetOnDisconnect;
|
||||
|
||||
private final static int FILTER_AMOUNT_THRESHOLD_S = 15;
|
||||
private final static int FILTER_AMOUNT_THRESHOLD_L = 15;
|
||||
private final static int FILTER_AMOUNT_THRESHOLD_M = 9;
|
||||
private final static int FILTER_AMOUNT_THRESHOLD_H = 4;
|
||||
private final static int FILTER_AMOUNT_THRESHOLD_U = 2;
|
||||
private final static int FILTER_TIME_THRESHOLD = 5000;
|
||||
|
||||
public RadioMenuItem chkAntiSpam_none;
|
||||
public RadioMenuItem chkAntiSpam_low;
|
||||
public RadioMenuItem chkAntiSpam_medium;
|
||||
public RadioMenuItem chkAntiSpam_high;
|
||||
public RadioMenuItem chkAntiSpam_ultra;
|
||||
|
||||
private Map<Integer, LinkedList<Long>> filterTimestamps = new HashMap<>();
|
||||
|
||||
@ -108,8 +110,10 @@ public class UiLoggerController implements Initializable {
|
||||
int headerId = packet.headerId();
|
||||
|
||||
int threshold = chkAntiSpam_none.isSelected() ? 100000000 : (
|
||||
chkAntiSpam_low.isSelected() ? FILTER_AMOUNT_THRESHOLD_S : (
|
||||
chkAntiSpam_medium.isSelected() ? FILTER_AMOUNT_THRESHOLD_M : FILTER_AMOUNT_THRESHOLD_H
|
||||
chkAntiSpam_low.isSelected() ? FILTER_AMOUNT_THRESHOLD_L : (
|
||||
chkAntiSpam_medium.isSelected() ? FILTER_AMOUNT_THRESHOLD_M : (
|
||||
chkAntiSpam_high.isSelected() ? FILTER_AMOUNT_THRESHOLD_H : FILTER_AMOUNT_THRESHOLD_U
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
<RadioMenuItem fx:id="chkAntiSpam_low" mnemonicParsing="false" text="Low" toggleGroup="$antispam" />
|
||||
<RadioMenuItem fx:id="chkAntiSpam_medium" mnemonicParsing="false" text="Medium" toggleGroup="$antispam" />
|
||||
<RadioMenuItem fx:id="chkAntiSpam_high" mnemonicParsing="false" text="High" toggleGroup="$antispam" />
|
||||
<RadioMenuItem fx:id="chkAntiSpam_ultra" mnemonicParsing="false" text="Ultra" toggleGroup="$antispam" />
|
||||
</items>
|
||||
</Menu>
|
||||
<CheckMenuItem fx:id="chkSkipBigPackets" mnemonicParsing="false" onAction="#toggleSkipPackets" selected="true" text="Skip big packets" />
|
||||
|
Loading…
Reference in New Issue
Block a user