-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 127b0af..a1d64a4 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp | |||
@@ -114,48 +114,52 @@ namespace OpieTooth { | |||
114 | } else { | 114 | } else { |
115 | odebug << "btDevice is ZERO" << oendl; | 115 | odebug << "btDevice is ZERO" << oendl; |
116 | return false; | 116 | return false; |
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | int BluezApplet::setBluezStatus(int c, bool sync) { | 120 | int BluezApplet::setBluezStatus(int c, bool sync) { |
121 | 121 | ||
122 | if ( c == 1 ) { | 122 | if ( c == 1 ) { |
123 | switch ( ODevice::inst()->model() ) { | 123 | switch ( ODevice::inst()->model() ) { |
124 | case Model_iPAQ_H39xx: | 124 | case Model_iPAQ_H39xx: |
125 | btDevice = new Device( "/dev/tts/1", "bcsp", "921600" ); | 125 | btDevice = new Device( "/dev/tts/1", "bcsp", "921600" ); |
126 | break; | 126 | break; |
127 | 127 | ||
128 | case Model_iPAQ_H5xxx: | 128 | case Model_iPAQ_H5xxx: |
129 | btDevice = new Device( "/dev/tts/1", "any", "921600" ); | 129 | btDevice = new Device( "/dev/tts/1", "any", "921600" ); |
130 | break; | 130 | break; |
131 | 131 | ||
132 | #if OPIE_VERSION >= 102010 | 132 | #if OPIE_VERSION >= 102010 |
133 | case Model_MyPal_716: | 133 | case Model_MyPal_716: |
134 | btDevice = new Device( "/dev/ttyS1", "bcsp", "921600" ); | 134 | btDevice = new Device( "/dev/ttyS1", "bcsp", "921600" ); |
135 | break; | 135 | break; |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | case Model_iPAQ_H22xx: | ||
139 | btDevice = new Device( "/dev/tts/3", "any", "921600" ); | ||
140 | break; | ||
141 | |||
138 | default: | 142 | default: |
139 | btDevice = new Device( "/dev/ttySB0", "bcsp", "230400" ); | 143 | btDevice = new Device( "/dev/ttySB0", "bcsp", "230400" ); |
140 | break; | 144 | break; |
141 | } | 145 | } |
142 | m_sync = sync; | 146 | m_sync = sync; |
143 | connect(btDevice, SIGNAL(device(const QString&, bool)), | 147 | connect(btDevice, SIGNAL(device(const QString&, bool)), |
144 | this, SLOT(slotDevice(const QString&, bool))); | 148 | this, SLOT(slotDevice(const QString&, bool))); |
145 | 149 | ||
146 | } else { | 150 | } else { |
147 | ::system("/etc/init.d/bluetooth stop >/dev/null 2>/dev/null"); | 151 | ::system("/etc/init.d/bluetooth stop >/dev/null 2>/dev/null"); |
148 | if ( btManager ) { | 152 | if ( btManager ) { |
149 | delete btManager; | 153 | delete btManager; |
150 | btManager = 0; | 154 | btManager = 0; |
151 | } | 155 | } |
152 | if ( btDevice ) { | 156 | if ( btDevice ) { |
153 | delete btDevice; | 157 | delete btDevice; |
154 | btDevice = 0; | 158 | btDevice = 0; |
155 | } | 159 | } |
156 | } | 160 | } |
157 | return 0; | 161 | return 0; |
158 | } | 162 | } |
159 | 163 | ||
160 | int BluezApplet::checkBluezDiscoveryStatus() { | 164 | int BluezApplet::checkBluezDiscoveryStatus() { |
161 | return isScanning; | 165 | return isScanning; |