-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for images from stratosattk1 and siren
- Loading branch information
1 parent
227560c
commit 7123915
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/ru/r2cloud/satellite/decoder/SputnixDecoder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ru.r2cloud.satellite.decoder; | ||
|
||
import java.awt.image.BufferedImage; | ||
import java.util.List; | ||
|
||
import ru.r2cloud.jradio.Beacon; | ||
import ru.r2cloud.jradio.sputnix.SputnixBeacon; | ||
import ru.r2cloud.jradio.sputnix.SputnixPictureDecoder; | ||
import ru.r2cloud.predict.PredictOreKit; | ||
import ru.r2cloud.util.Configuration; | ||
|
||
public class SputnixDecoder extends UspDecoder { | ||
|
||
public SputnixDecoder(PredictOreKit predict, Configuration config) { | ||
super(predict, config, SputnixBeacon.class); | ||
} | ||
|
||
@Override | ||
protected BufferedImage decodeImage(List<? extends Beacon> beacons) { | ||
@SuppressWarnings("unchecked") | ||
SputnixPictureDecoder decoder = new SputnixPictureDecoder((List<SputnixBeacon>) beacons); | ||
while (decoder.hasNext()) { | ||
return decoder.next(); | ||
} | ||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters