da_funk 3.29.1 → 3.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 451f1a04625db6dbf5b6e90813c47a8419fbe68cfff6ba8c7ccbc233423e5253
4
- data.tar.gz: 0d4347d21f0bb1eaff18a4dab1d70d2b573ecb82ffd7da0a0b87bf0dd94bcf6c
3
+ metadata.gz: 58cb59f7b97099d4e94b66bdf46f9cfc7e4f39893cf88b56b23b352476f3bb2f
4
+ data.tar.gz: 2c81b4d5a3226c0c5d3cc25176625183f5a3766bea7a120b134604bfb030dc16
5
5
  SHA512:
6
- metadata.gz: 103db5599eafffef2a1d29ebe0f82ed0bbccf358af999ec769f81153769d099e6f62e25acc9c49e5dde401b501f886e40b128a9634f1438f8d2d5bbc42ebbfba
7
- data.tar.gz: cf0561ec14063622c8a694eb2d5cc9b4eb37188c2edea91ce2eea6830c357dfa8646c8792fe956ad430356614da9006a155b77505301aca9fc191a813356227a
6
+ metadata.gz: dcea670e59016cb7b6a6b297239130ee3a9ff372a94acc8edd4f31a623a6db842f9a43d3cf92ff8253eb77108055ad213d82f12645f572f40548968d435ec7ec
7
+ data.tar.gz: bde518c1731e7ae15d864f87f423d518672ea856251263092f408875c8c6d8c4acc52f023015c90edbb9cc917b15243539e37c7f7f093684837718c8accac798
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (3.29.1)
4
+ da_funk (3.30.0)
5
5
  archive-zip (~> 0.5)
6
6
  bundler
7
7
  cloudwalk_handshake
@@ -1,5 +1,12 @@
1
1
  # DaFunk
2
2
 
3
+ ### 3.30.0 - 2020-11-16
4
+
5
+ - Replace GPRS icon to 3G;
6
+ - Added new method main_image_format on Device::Display;
7
+ - Use main_image_format method to get the image name instead adapter;
8
+ - Added new class DaFunk::Transaction::Reversal.
9
+
3
10
  ### 3.29.1 - 2020-11-04
4
11
 
5
12
  - Fix battery charging status. When power supply is connected the SDK always returns 50% of battery, in this case it won't show the percentage until the SDK returns 100%.
data/Rakefile CHANGED
@@ -53,6 +53,7 @@ FILES = FileList[
53
53
  "lib/da_funk/application.rb",
54
54
  "lib/da_funk/transaction/iso.rb",
55
55
  "lib/da_funk/transaction/download.rb",
56
+ "lib/da_funk/transaction/reversal.rb",
56
57
  "lib/da_funk/notification_event.rb",
57
58
  "lib/da_funk/notification_callback.rb",
58
59
  "lib/da_funk/notification.rb",
@@ -123,7 +123,7 @@ module DaFunk
123
123
  self.signal = sig
124
124
 
125
125
  if Device::Network.gprs?
126
- Device::Display.print_status_bar(SLOT_MEDIA, "./shared/GPRS.png")
126
+ Device::Display.print_status_bar(SLOT_MEDIA, "./shared/3G.png")
127
127
  Device::Display.print_status_bar(SLOT_SIGNAL_LEVEL,
128
128
  get_image_path(:gprs, self.signal))
129
129
  elsif Device::Network.wifi?
@@ -0,0 +1,13 @@
1
+ module DaFunk
2
+ class Transaction
3
+ class Reversal
4
+ def self.filename
5
+ DaFunk::ParamsDat.file['reversal_file_name'] || 'cw_reversal_transact.dat'
6
+ end
7
+
8
+ def self.exists?
9
+ File.exists? "./shared/#{filename}"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,4 +1,4 @@
1
1
  module DaFunk
2
- VERSION="3.29.1"
2
+ VERSION="3.30.0"
3
3
  end
4
4
 
@@ -71,13 +71,22 @@ class Device
71
71
  end
72
72
 
73
73
  def self.main_image
74
- if adapter.respond_to?(:main_image) &&
75
- File.exists?("./shared/#{adapter.main_image}")
76
- adapter.main_image
74
+ file = main_image_format
75
+ if File.exists?("./shared/#{file}")
76
+ file
77
77
  else
78
78
  MAIN_BMP
79
79
  end
80
80
  end
81
+
82
+ private
83
+ def self.main_image_format
84
+ if DaFunk::Transaction::Reversal.exists?
85
+ "main_#{Device::System.model}_reversal.bmp"
86
+ else
87
+ "main_#{Device::System.model}.bmp"
88
+ end
89
+ end
81
90
  end
82
91
  end
83
92
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: da_funk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.29.1
4
+ version: 3.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Scalone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-04 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -179,6 +179,7 @@ files:
179
179
  - lib/da_funk/test.rb
180
180
  - lib/da_funk/transaction/download.rb
181
181
  - lib/da_funk/transaction/iso.rb
182
+ - lib/da_funk/transaction/reversal.rb
182
183
  - lib/da_funk/version.rb
183
184
  - lib/device.rb
184
185
  - lib/device/audio.rb